Install rbenv which is much better than RVM. With git installed run this command on the terminal.
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
ruby-build, which simplifies the way Ruby is installed.
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
Add rbenv to $PATH. To do this run the following command:
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
Add the startup script to your terminal startup file. Run the command.
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
Restart your terminal to load these new settings, or run the command source ~/.bashrc.
If everything worked out. You can now install ruby. To find out which versions are available, run the command rbenv install -l.
$ rbenv install -l
Available versions:
1.8.6-p383
1.8.6-p420
1.8.7-p249
1.8.7-p302
1.8.7-p334
...
To install the latest version currently available, please run rbenv install 2.3.1.
This process will take a while, since rbenv will compile Ruby.
When the installation is over, run the global rbenv 2.3.1 command to set the global version of Ruby/
To view the Ruby version, run ruby -v.
Own opinion about rbenv being superior to RMV and the ability to install plugins to make your life easier. One of them is rbenv-Gem-rehash, which automatically rehashing whenever a Gem is installed or removed.
"Rehashing is the process of upgrading $PATH with Gems binaries. The rbenv init command does this for you, but it is only executed when a new terminal session is started; thus, any Gem installed after this step may not work properly unless you manually execute the rbenv rehash command."
Run the following command to install the plugin:
$ git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash
source: Blog Nando Vieira