How to Install Ruby on Rails on Linux

Ruby on Rails is an open source freely available web development framework.Rails is a Model View Controller (MVC) framework. As you can imagine from the name, applications written using Model View Controller frameworks have three main components: a model, which represents the data and associated logic; the view, which represents how a user interacts with the application; and the controller, which contains all of the business logic that drives the application. This is an artificial distinction, of course, but it is a powerful one.Apache 2.0+ and MySQL should be installed on your Red Hat Linux computer to run these examples.

How to install Rails?

There are commonly 4 steps to follow with installation.

1. The first, most basic requirement for running Rails is having the Ruby programming language installed. All recent distributions of Fedora™ Core or Red Hat® Enterprise Linux® include Ruby. You can check to see if Ruby is installed by running the command:
#ruby -va

If Ruby is installed, you should get a message that tells you which version you have. If you get a “command not found” error, you don’t have Ruby installed. If it is not installed, or if your version is older than 1.8.4, you can install Ruby as follows:

wget -xzvf ruby-1.8.4.tar.gzcd ruby-1.8.4./configure


make install

2. Next, we will need to install the RubyGems development system. RubyGems is a powerful system for managing and installing Ruby code libraries, known as gems. Rails itself is composed of several gems, and once you’ve successfully installed RubyGems, we can proceed to install Rails. We can install RubyGems as follows:


tar -xzvf rubygems-0.9.0.tgz

cd rubygems-0.9.0

ruby setup.rb

3. Now we have Ruby and RubyGems installed, we can install Rails itself:
gem install -y rails

4. Now we need to install MySQL , as MySQL will be database

we can do this easily using this command:

#gem install mysql

Happy To Help You ….;)
Genowin Technologies
All Linux, UNIX Solution & Training.
Genowin Technologies

Leave a Reply

Your email address will not be published. Required fields are marked *