How to install ruby with rvm on rhel 7 or centos 7

Published by shyam jos on

In this tutorial, I will show you how to install Ruby using RVM on RHEL 7 (Red Hat Enterprise Linux) or Centos 7 server. Steps are same for RHEL 7 and centos7.

Install dependencies

yum install -y curl gpg gcc gcc-c++ make libyaml 

wget https://rpmfind.net/linux/centos/7.5.1804/os/x86_64/Packages/libyaml-devel-0.1.4-11.el7_0.x86_64.rpm

rpm -ivh libyaml-devel-0.1.4-11.el7_0.x86_64.rpm

Import RVM Package Keys

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

Install RVM (System-wide)

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

Add user to RVM group

usermod -a -G rvm your_app_user

Note: After Adding user to RVM group logout from current shell and login again to load rvm profile

Install Ruby using RVM

rvm install ruby-2.3.3 --disable-binary

ps: replace the ruby version with the one you want to install

Verify ruby installation

rvm list and ruby -v


shyam jos

My name is Shyam Jos, I am a passionate Linux system administrator from Kochi, India. I am a strong advocate of using Linux and Open-Source software.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.