How to Install Ruby 2.3.3 on CentOS/RHEL with RVM

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 include 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 development libraries required to run Ruby on Linux. Use the 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 the 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 a single system using RVM. Use the following command to install the 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 the 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. Ruby

Enjoy it!

No Responses

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.