RVM on CentOS

RVM also known as Ruby Version Manager is a command-line tool which allows you to easily install, manage, and work with multiple versions of Ruby or environments from interpreters to sets of gems. Here is an easy guide to install RVM on CentOS.

Installing

Install Curl.

sudo yum install curl

Install RVM.

This will install RVM.

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

Exit the terminal

exit # To close the Terminal

RVM is a smart tool it figures by itself what Linux distribution you are using. We can now download the required tools to build Ruby on CentOS.

rvm requirements

I will be installing the current stable version of Ruby using RVM. At the time of this post the latest version of Ruby is Ruby 2.1.1, So I will be installing it in using the command below, you can install any version of Ruby as you require by simply changing the version ‘2.1.1’ by the version you prefer or require for your project.

rvm install 2.1.1

To set Ruby 2.1.1 as the default Ruby environment.

rvm use 2.1.1 –default

If you have issue with setting the default Ruby environment or get an error that says the command does not exist, You can fix that too by adding the lines below in your “.bashrc`.`

source ~/.rvm/scripts/rvm

Now we have Ruby installed on CentOS using RVM. If you have any problem, feel free to leave a comment below.