How to Install Ruby 2.3.3 on CentOS/RHEL with RVM

Share It!

Ruby is a dynamic, object-oriented programming language.We are using RVM, which stands for Ruby Version Manager. Ruby 2.3.3 provides substantial performance and reliability improvements, includes frozen string literal pragma, safe navigation operator and many others, while maintaining source level backward compatibility with Ruby.

Ruby 2.3.3

See Also:
1. How to Install Ruby 2.2.4 on CentOS/RHEL with RVM
2. How To Deploy a Rails Application with Apache using Phusion Passenger
3. How To Install Apache Maven on Ubuntu 16.04 and 14.04
4. Install Apache Maven on CentOS 7/6/5
5. Install LAMP (Apache 2.4, MySQL 5.6, and PHP 7.0) on Ubuntu using PPA
6. Install LAMP (Apache 2.4, MySQL 5.6, and PHP 7.0) on CentOS/RHEL 7
7. How to Install Ruby 2.4.0 on CentOS/RHEL with RVM
8. How To Install Ruby on Rails on Ubuntu using RVM

This tutorial will help you to install Ruby 2.3.3 on CentOS/RHEL using RVM.

Step 1. Install Dependencies

There are few developemnt libraries required to run Ruby on Linux. Use following command to install recommended packages

# yum install gcc-c++ patch readline readline-devel zlib zlib-devel openssl-devel make
# yum install bzip2 autoconf automake libtool bison iconv-devel sqlite-devel libyaml-devel libffi-devel

Step 2. Install RVM

Install the latest stable version of RVM on your system using the following command.

# curl -sSL https://rvm.io/mpapis.asc | gpg --import -
# curl -L get.rvm.io | bash -s stable

Step 3. Setup RVM Environment

Also, setup rvm environment using below command.

# source /etc/profile.d/rvm.sh
# rvm reload

Step 4. Install Ruby 2.3.3

You can manage multiple ruby version on single system using RVM. Use following command to install required version of Ruby.

# rvm install 2.3.3

Step 5. Setup Default Ruby Version

Now first check currently installed ruby versions on your system.

# rvm list
rvm rubies

 * ruby-2.2.4 [ x86_64 ]
=> ruby-2.3.3 [ x86_64 ]

# => - current
# =* - current && default
#  * - default

After that use rvm command to setup default ruby version.

# rvm use 2.3.3 --default
Using /usr/local/rvm/gems/ruby-2.3.3

Step 6. Check Current Ruby Version.

Using following command you can check the ruby version.

# ruby --version
ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-linux]

Read our next article to integrate Ruby with Apache web server with easy steps.

References:
1. http://rvm.io/rubies/installing

Enjoy it!

No Responses

Leave a Reply

Your email address will not be published.