Blog

Installing multiple versions of Ruby and Switching using RVM

Tags: gpgRoRrubyRVM

Published on: April 12, 2016 by Manu M.

Installing multiple versions of Ruby and Switching using RVM

Scenario:

Last day I was trying to perform  Ruby installation  on my distro. Problem was that I already have latest version Ruby installation and wish to keep it and at the same time install an older version. After doing some research on this I came across RVM. Now RVM is an incredible work which saved my day. Before get into it multiple ruby installation we can what is Ruby and RVM.

What is Ruby?

So, What is Ruby? Ruby is a scripting language which can be run on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX. Ruby is used in typical scripting language applications such as text processing and “glue” or middleware programs. It’s suitable for small, ad-hoc scripting tasks that, in the past, may have been solved with Perl.

What is RVM?

Now back to RVM. RVM or Ruby Version Manager is a platform designed to manage multiple installations of Ruby on the same device. The different versions can then be switched between to enable a developer to work on several projects with different version requirements.

Note: curl needs to be installed before proceeding.

Install Ruby Version

Before starting we will need to download the gpg-keys.

Run following from the terminal.

gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3

Now you can install Ruby by following command

\curl -sSL https://get.rvm.io | bash -s stable --ruby=x.x

x.x refers to the version you need to install

To view the installed Rub version, run following command.

rvm -v

List Ruby Versions

To list installed ruby versions, you can run following command.

rvm list

Switch Version

rvm --default use <version>

Never thought multiple Ruby installation could be this much easy. 🙂

Get 24/7 expert server management

Category : General, Howtos, Linux

Manu M.

Manu M.

Manu has been with us for past one and half years and is a person with good technical skills and domain knowledge. Being a highly athletic personality, Manu likes to play Cricket and Badminton of all games whenever he gets time off. Apart from his technical and athletic abilities, he is a good writer and has tried his hands on penning a few poems of his own. He believes in the mantra that "small things matter the most" and this nature can also visible in his blogs and writings.

You may also read:

Comments

Add new commentSIGN IN

Let's Connect

Categories

Your Cart

Cart is empty.

Subtotal
₹0.00
APPLY
0
Send this to a friend