• Setting up Hardy for Ruby on Rails Hosting

    These instructions should take you through the process of setting up Ubuntu Server version 8.04 (Hardy Heron) for Ruby on Rails hosting using Apache and Passenger Phusion (mod_rails). This will also step you through adding certain programs needed to install the Rmagick gem required to add Captcha to a RoR application and the mysql gem.

    Install the server with just the SSH server option so you can copy and paste the commands for simplicity

    So once you have the base installed, make sure your distribution is up to date:

    
    sudo apt-get update
    sudo apt-get dist-upgrade

    Install the package required for building software, siince we will be doing some compiling:

    sudo apt-get install build-essential

    Read the rest of this entry »

    Share
  • Installing the Mysql Gem

    This is just a self reminder. I always seem to forget the dev package that is required to build the mysql gem. Failure to install this results in all kinds of headaches:

    sudo apt-get install libmysqlclient15-dev

    Then install the gem and you are all set:

    sudo gem install mysql




    Share
  • Installing Rmagick 2.8 Gem on Hardy

    After jumping through a few hoops to get this installed, we figured it would be a good idea to post our solutions. This is what we had to do, your needs may be different. Our system was a fully up to date version of Hardy Heron
    First, in order to install the Rmagick2 gem on any system, you first must install ImageMagick 6.3.0. The version we used was 6.4.8-5. It is best to compile your own copy of ImageMagick, but if you wish to use a deb package then you probably aren’t reading this.
    Before you install ImageMagick, you will want to make sure you have all the necessary packages and remove old items. Run the following:

    Read the rest of this entry »

    Share
  • Problem Installing Typo Gem

    We have a rails server that we wanted to install the typo gem onto.  Alas, our attempts to install the gem kept failing with the following error:

    
    Building native extensions.  This could take a while...
    ERROR:  Error installing typo:
    	ERROR: Failed to build gem native extension.
    
    /usr/bin/ruby1.8 extconf.rb install typo
    checking for fdatasync() in -lrt... yes
    checking for sqlite3.h... no
    
    make
    make: *** No rule to make target `ruby.h', needed by `sqlite3_api_wrap.o'.  Stop.
     

    If you are seeing this error, it means you are likely missing a SQLite3 library or 2. We always use MYSQL, so we did not have any SQLite3 packages installed. Since it was failing on a build, we installed the libsqlite3-dev package. This was all we needed to do and the typo gem installed perfectly with all its dependencies.

    On Ubuntu, do the following to install:

    sudo apt-get install libsqlite3-dev

    Redhat\Centos will be different (for us, substitute apt-get for yum)
    Read the rest of this entry »

    Share