« Back
in ruby linux read.

Install RVM & Ruby on ubuntu 14.04.

I had searched a lot to install RVM & manage ruby version on ubuntu. First I ignored RVM and tried installing ruby from other sources. But, later it was really difficult to manage the ruby version properly. So, I just figured out the right way, removed all the installed ruby versions and installed via RVM.

Installing RVM

Actually its pretty easy to install rvm on ubuntu, you just need to fire a couple of commands.

  1. curl -L https://get.rvm.io | bash

    This will install rvm on the system and gives a message RVM installed at ‘/usr/local/rvm/’. Please not the installation path may differ, and we need the path to export RVM paths in the next command

  2. source /usr/local/rvm/scripts/rvm

    Above command will export rvm paths and we can use rvm commands after that. Make sure you are using the RVM installation path for exporting.

    Try some RVM commands like rvm list to make sure rvm is available.

Installing Ruby

Once RVM is installed, execute the following command to install ruby,

rvm install ruby-2.1.0

Installation would take few moments, and you can install whichever version you need by just changing the version number in the command.

After the installation, just execute rvm list in terminal to list the installed ruby versions and you can choose one of the available version by executing,

rvm use ruby-2.1.0

To make rvm accessible from everywhere, please include the following script in your ~/.bash_profile.

[[ -s "/usr/local/rvm/scripts/rvm" ]] && . "/usr/local/rvm/.rvm/scripts/rvm"

Be sure, to update the command with your rvm installation path.