Install Ruby Using RVM

At first I installed Ruby using the default apt-get command, then I realised it is an older version. Ubuntu doesn’t keep maintain a latest version on their repository. So to remove the original one.

You can check where the current Ruby installed location by

$ruby -e 'puts $:'

To remove all the ruby installed

$sudo apt-get purge ruby rubygems

Then use RVM to install Ruby

$sudo apt-get install ruby-rvm
$rvm install ruby-1.9.3-p125</p>

The installation process might take a while depends on the machine power.

To select which version of ruby to use, in case you have a lot different version of ruby installed on rvm earlier.

$rvm use 1.9.3-P125
$rvm list
$ruby -v