

This might take a while, as RVM will download the Ruby source code and compile it.Īfter the installation, you can set Ruby 3.2 as the default version with: rvm use 3.2 -default The following command will install Ruby 3.2: rvm install 3.2 With RVM installed, we can now install Ruby. To ensure that RVM is installed, you can check its version with: rvm -version Step 4: Install Ruby

The stable flag tells the script to install the latest stable version of RVM.Īfter installing RVM, you need to set up the RVM environment using the following command: source ~/.rvm/scripts/rvm

This command fetches a script from the RVM website and runs it. Here’s the command to do that: curl -sSL | bash -s stable Run the following command to do this: sudo yum install curl gpg gcc gcc-c++ make libyaml-devel openssl-devel readline-devel zlib-devel -y Step 3: Install RVM The next step is to install some dependencies required for RVM. You can do this by running the following command: sudo yum update -y Step 2: Install Dependencies Step 1: Update Your Systemīefore we start, it’s always a good idea to update your system packages to the latest versions. Please note that this guide assumes that you are working with a non-root user with sudo privileges configured on your system. In this article, we’ll walk you through installing Ruby 3.2 using RVM on CentOS/RHEL. It gives you flexibility concerning the version of Ruby you want to use in your system and helps in managing/gem dependencies. RVM is a command-line tool that allows you to easily install, manage, and work with multiple ruby environments. In this tutorial, we’ll demonstrate how to install Ruby 3.2 on CentOS or Red Hat Enterprise Linux (RHEL) using the Ruby Version Manager (RVM). Ruby offers a simple syntax that’s natural to read and easy to write. It was designed by Yukihiro “Matz” Matsumoto to prioritize programmer productivity and fun. Ruby is a highly popular, interpreted, high-level programming language.
