Installation of different versions of Ruby in Mac OSX

\curl -sSL https://get.rvm.io | bash -s stable
source /Users/dev/.rvm/scripts/rvm
rvm list known
rvm install ruby-2.4.2
ruby -v

To use the latest installed version, run

rvm use ruby-2.4.2

To set this as the default version, run

rvm use ruby-2.4.2 --default

Uninstallation of rvm

rvm implode

This will remove the rvm/ directory and all the rubies built within it. In order to remove the final trace of rvm, you need to remove the rvm gem, too:

gem uninstall rvm

If you’ve made modifications to your PATH you might want to pull those, too. Check your .bashrc, .profile and .bash_profile files, among other things.

You may also have an /etc/rvmrc file, or one in your home directory ~/.rvmrc that may need to be removed as well.