$ curl -L get.rvm.io | bash -s stable
$ source ~/.bashrc
$ source ~/.bash_profile
Use Rvm to install Ruby
$ rvm install 2.1.1
$ rvm use 2.1.1 --default # set ruby-2.1.1 as default
Example-1: Project-1 use ruby-1.9.2 & rails-3
$ rvm install 1.9.2
$ rvm use 1.9.2
$ rvm gemset create rails3
# create a file '.rvmrc' in Project-1/, content is:
rvm use ruby-1.9.2-p320@rails3
Example-2: Project-2 use ruby-2.1.1 & rails-4
$ rvm install 2.1.1
$ rvm use 2.1.1
$ rvm gemset create rails4
# create a file '.rvmrc' in Project-2/, content is
rvm use ruby-2.1.1@rails4
http://ruby-china.org/wiki/rvm-guide