Installing Rails

The basic commands to get Ruby on Rails up and running quickly:

Install Latest Version of Rails

1
sudo gem install rails

Install Specific Version of Rails

1
sudo gem install rails --version 3.0

Update Rails

1
sudo gem update rails

Rolling Back to Previous Version of Rails

1
sudo gem uninstall rails

You’ll then see something like this:

1
2
3
4
5
6
7
Select gem to uninstall:
 1. rails-3.0.0
 2. rails-3.0.5
 3. rails-3.0.11
 4. rails-3.1.1
 5. rails-3.2.1
 6. All versions

Type the number of the version you’d like to uninstall and hit enter, and away it goes.

RVM

If you need specific ruby/rails environments for various projects, then you should be using RVM and named gem sets.