Installing Ruby on Rails (linux)

March 12th, 2009 by keith Leave a reply »

This tutorial is for installing Ruby on Rails (RoR) on Linux (Applies to all OS’s).

This is a three step process that requires us to install the Ruby programming language, followed by Ruby Gems (much like YUM but for Ruby extensions) then finally Rails. Please note that if you’ve installed Rails before, DO NOT install the RubyFCGI Gem as it causes problems on FC4 and Lighttpd.

Installing Ruby

To install Ruby, while still in YUM Extender, click on the Install icon that is located on the left toolbar. Now we can search for uninstalled Ruby packages by typing Ruby into the filter textbox near the top of the Yum Extender window then pressing the Enter key on your keyboard. Now you should see a list of all Ruby related software that can be installed on your FC4 system. The packages that we need and the ones that you place check marks next to are:

* ruby
* ruby-devel
* ruby-libs
* irb
* rdoc

Once you have selected these packages, click the Install button at the bottom of the Yum Extender window, follow the prompts and wait for the packages to download and install, then we will move on to the next step.
Installing Ruby Gems

To install Ruby Gems, we’ll need to go back to a Terminal window and type the following commands (pressing enter at the end of each line):

wget http://rubyforge.org/frs/download.php/5207/rubygems-0.8.11.tgz
tar zxvf rubygems-0.8.11.tgz
cd rubygems-0.8.11
ruby setup.rb

If all goes well, you should see a message that says Successfully build Ruby Gems.

Now lets cleanup the files we downloaded and extracted by typing:

cd ..
rm ruby* -drf
Installing Rails

Once Ruby Gems has installed, installing Rails becomes very easy. From the same terminal window type:

gem install rails –include-dependencies

Wait for the Rails software to download and install, then close the terminal window.

Advertisement

Leave a Reply