Installing Ruby on Rails

August 5, 2008 · Filed Under Linux, Programming, Software · 1 Comment 

Ruby on Rails is an amazing web framework that allows you to create clean and simple code and develop web applications with blazing fast speed.

Installing Ruby on Rails can be fairly difficult, configuration can sometimes mean that it doesn’t work, but this guide will teach you how to install it initially.

If your server has cPanel/WHM installed on it, then please go down to the bottom of this guide, since it is easy to install it if your server has cPanel/WHM installed.

If your server is running without cPanel/WHM then you will need to do this:

  1. Log into your server through SSH. Using the root account is best.
  2. Type “yum install ruby irb ri rdoc”, this will install Ruby and some other components that are needed by Ruby. Click y if you are prompted to.
  3. Type “yum install rubygems”, this will install RubyGems on your server.
  4. Type “gem update –systemNow” and this will update your Gems installation, as yum may not have the latest version.
  5. Now all you need to do is install Rails, which is easy now that you have RubyGems installed. Just type “gem install rails –include-dependencies” and wait for it to complete.
  6. You will now have a fully working installation of Ruby on Rails, including Ruby, Rails, RubyGems and some other needed software.

If you server has cPanel/WHM installed on it then it is easy to install Ruby on Rails, and you should also do it through cPanel/WHM to make sure it is configured correctly and so that you can access it from within cPanel.

Follow this guide to install Ruby on Rails if your server is running on Ruby on Rails:

  1. Log into your server using SSH, it is best to be logged in as root.
  2. Type “/scripts/installruby”, this will run the cPanel/WHM automated Ruby on Rails installer. This is good because it makes sure everything is set up perfectly for cPanel/WHM.
  3. Type “/cpanel/bin/ror_setup”, this will make sure that Ruby on Rails is configured to run at boot, if you don’t do this then you will have to manually start it or your Ruby on Rails applications wont run.

Once you have installed Ruby on Rails you can start developing RoR applications. I would recommend the cPanel/WHM set up because it is so easy and everything works perfectly.

If you have any problems, please comment here. Also a “thank you” comment is nice.

« Previous Page