How to install Ruby On Rails on Ubuntu 10.04
This post will show you how to install Ruby On Rails on Ubuntu 10.04. However, installing on another Ubuntu version should not be different so much. Therefore, you can follow the steps mentioned on this post too. This tutorial will explain installing Ruby On Rails using RVM (Ruby Version Manager). Before following this tutorial, please make sure that you have installed all prerequisites below.
- Ubuntu 10.04 with standard Ruby libraries in the Ruby basic package. Make sure you have installed Ubuntu 10.04 correctly. It's better if your machine is connected to internet directly. In case, there's a missing library, you can install it easily if your machine is connected to internet.
- RVM (Ruby Version Manager). You can refer to this link to install RVM on your Ubuntu box. To check if it's been installed just run rvm on your Ubuntu terminal.
- Ruby Gem. To check if it's been installed just run gem -v on your Ubuntu terminal.
- Open your Ubuntu terminal and run : rvm install 1.8.7 (to install Ruby 1.8.7). Change to 1.9.2 or 1.9.3 to install that version.
- Wait until the installation above is complete. Depending on your connection, it may take several minutes (or hours).
- After it's complete, you have to select the installed ruby. To do it , just run rvm use <ruby-version>. For example : rvm gemset use 1.9.2
- Then you may create a new gemset. To do this , just run rvm gemset create <name>. For example : rvm gemset create test
- Tell Ruby to use that gemset by running: rvm gemset use <name>
- At last, you can install Rails by running: gem install rails -v <version>
Please remember that Ruby 1.8.x should be paired with Rails 2.3.x. While Ruby 1.9.x should be paired with Rails 3.x.x.
P.S. Currently, comment form is disabled. If you have something to say, just drop me an e-mail at kevin[at]kevinhq[dot]com