1. Goto download section of www.rubyonrails.org
2. Check the recommended version for ruby to be installed.
At present the recommended version is Ruby 1.8.7.
3. Download Ruby 1.8.7 (preferably Ruby 1.8.7-p249 RubyInstaller).
4. Download RubyGems. You can download the latest one. (ruby-gems-1.3.7.zip)
5. Install Ruby. (You must check set environment path during installation.)
6. Extract ruby-gems and navigate to the extracted folder using cmd.
7. Inside the ruby-gems folder type:
ruby setup.rb
8. Now RubyGems is installed.9. Now you can simply run
gem install rails
to install rails.
Its found that there are some problems with Ruby1.9.1 with rails (in Ubuntu). However Ruby 1.8.7 works fine.