Ruby on Rails, or simply Rails, is a web application framework written in Ruby.

Rails is a model–view–controller (MVC) framework, providing default structures for a database, a web service, and web pages.

Lets get started with our setup:

Install Packages:

$ yum install ruby -y

Install Dependencies:

$ yum install gcc g++ make automake autoconf curl-devel openssl-devel zlib-devel httpd-devel apr-devel apr-util-devel sqlite-devel -y
$ yum install ruby-rdoc ruby-devel -y

Install Ruby Gems:

$ yum install rubygems -y


Install Ruby Gems from source

$ mkdir ~/src
$ cd ~/src
$ wget -zxvf rubygems-1.3.6.tgz
$ cd rubygems-1.3.6
$ ruby setup.rb

Install Rails:

$ gem update
$ gem update --system
$ gem install rails 
$ gem install rails -V