Tuesday, April 3, 2012

Installing Ruby on Rails using RVM in Ubuntu

Please follow the commands given in the steps
Step 1 :: Install RVM
 
$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)

$ rvm get latest

$ rvm reload

$ rvm -v
e.g. rvm 1.10.2 by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.beginrescueend.com/]

Step 2 :: Install Ruby 1.9.3

rvm installation notes for your operating system version


$ rvm requirements

$ rvm install ruby-1.9.3-p125

Set default
$ rvm --default use ruby-1.9.3-p125
$ ruby -v
e.g. ruby 1.9.3p125 (2012-02-16 revision 34643) [i686-linux]

Step 3 :: Check for gem installation
$ gem -v
e.g. 1.8.21

If gem is installed, update gem system
$ gem update --system

Step 4 :: Update Rake

$ gem update rake
$ rake --version

Step 5 :: Create rails gemset

$ rvm ruby-1.9.3-p125@rails32 --create --default

Step 6 :: Update Bundler

$ gem update bundler
$ bundle --version

Step 7 :: Install Rails 3.2.3

$ gem install rails
$ rails -v

Step 8 :: JavaScript Runtime for Ubuntu

$ sudo apt-get install nodejs

Step 9 :: Create a Rails app

$ rails new app_name