Install rvm first :
$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) $ source ~/.bash_profile
Once rvm is installed, use it to install jruby:
$ rvm install jruby-1.6.7
Then you can use this version:
$ rvm use jruby-1.6.7
Finally, install the rails:
$ jruby -S gem install rails
Update
In later versions of rvm, installing the latest version of jruby and rails is very simple :
$ \curl -L https:
source share