How to install multiple ruby version with Ruby Version Manager (RVM) on Amazon Linux AMI/ CentOS 6.4/ RHEL/ Fedora

rvm-logoRuby Version Manager or RVM is a unix-like application designed to manage multiple Ruby installations on the same machine. We can switch between the different versions to work on different projects with different version requirements.

In this article I will show you how to install ruby 1.9.3 and 2.0.0 version on a same machine using RVM.

Upgrade your packages:

Install Recomented packages:

Now we will install the latest stable version of RVM by issuing below command.

After installation complete we have to configure RVM environment. Issue below command:

Now we will install ruby version 2.0.0. List all the available ruby version by issuing below command:

Now we can install ruby 2.0.0 latest patch level or install any patch-level by picking from the displayed list:

To install the latest patch level of 2.0.0 issue the below command:

You will see the out put like below:

To install a particular patch level issue below command:

Install ruby version 1.9.3

After completing the installation now we can verify the installed ruby versions on our machine by issuing below command:

Now to switch the ruby versions issue the below command:

Verify the ruby versions after every switch by issuing the below command:

To setup default ruby version use the below command:

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS
The following two tabs change content below.

Tapas Mishra

Sr. Engineer (DevOps)
Loves to work on Opensource products. Having experience on Linux environment. Knowledge on Public cloud services like AWS, Rackspace, DigitalOcean, Linode. Please don't hesitate to give a comment on the posts. Your comments are my strength.

Leave a Reply