Install RVM ( Ruby Version Manager ) in Ubuntu 12.04 Linux for Ruby

Let’s install Ruby Using RVM…

Removing Ubuntu’s old rvm and ruby

First of all lets clean-up little bit.

As i know Ubuntu editions comes with a version of RVM but unfortunately it doesn’t work correctly, so what we are going to do is that we will clean-up old stuffs if there is any!

If you leave it, your Ubuntu will become sad when you try to install the real rvm.

It’s not a big deal, but we do need to get rid of it from the system before we start.

sudo apt-get remove --purge ruby-rvm ruby
sudo rm -rf /usr/share/ruby-rvm /etc/rmvrc /etc/profile.d/

# See if there is anything
ls -d ~/.rvm*
ls -d ~/.gem*
ls -d ~/.bundle*

# Delete them (ignoring those that don’t exist)
rm -rf ~/.rvm* ~/.gem/ ~/.bundle*

First we’ll make sure that your system has all the prerequisite system utilities. There’s no harm in doing this gain if you’ve done it before. It will simply skip whatever has been installed previously.

sudo apt-get update
sudo apt-get install -y \
git \
build-essential \
curl \

# For bash
echo "[[ -s '${HOME}/.rvm/scripts/rvm' ]] && source '${HOME}/.rvm/scripts/rvm'" >> ~/.bashrc

Note: The && is a way to say run this next command, but only if the previous command had no errors.

curl -L | bash -s stable

source ~/.bashrc

rvm install ruby 1.9.3

rvm use --default 1.9.3


5 thoughts on “Install RVM ( Ruby Version Manager ) in Ubuntu 12.04 Linux for Ruby”

  1. % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 –:–:– –:–:– –:–:– 0curl: (7) Failed to connect to port 443: Network is unreachable

  2. gpg: Can’t check signature: public key not found
    Warning, RVM 1.26.0 introduces signed releases and automated check of signatures when GPG software found.
    Assuming you trust Michal Papis import the mpapis public key (downloading the signatures).

    GPG signature verification failed for ‘/home/juned/.rvm/archives/rvm-1.26.3.tgz’ – ‘’!
    try downloading the signatures:

    gpg –keyserver hkp:// –recv-keys D39DC0E3

    or if it fails:

    command curl -sSL | gpg –import –

    the key can be compared with:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s