Install Ruby on Rails on AlmaLinux 9

In this tutorial, you will learn to Install Ruby on Rails on AlmaLinux 9 Step by Step.

You can use the Ruby on Rails web application framework to build your application. It has been said that it is the most powerful web application platform.

Now follow the steps below to set up Ruby on Rails on AlmaLinux 9:

  • Install RVM (Ruby Version Manager)
  • Use rvm to install the Ruby
  • Use gems to install the Rails

Steps To Install Ruby on Rails on AlmaLinux 9

To complete this guide, you must log in to your server as a non-root user with sudo privileges. To do this, you can follow this guide on Initial Server Setup with AlmaLinux 9.

Step 1 – Install RVM on AlmaLinux 9

First, you need to run the system update with the command below:

sudo dnf update -y

Then, use the following curl command to download and install RVM:

\curl -sSL | bash

When your installation is completed, you will get the following output:

Thanks for installing RVM 🙏

Add Regular Users To the RVM Group

At this point, you should add the users to the RVM group because the installer no longer auto-adds root or users to the RVM group. 

First, create your users with the following command:

adduser orca

Next, use the following command to add the user to the RVM group:

usermod -aG rvm orca

Source the RVM

Now you need to source the following file by using the command below:

source /usr/local/rvm/scripts/rvm

Apply the changes by using the following command:

rvm reload
RVM reloaded!

Install RVM Package Requirements

At this point, you need to install the package requirements with the following command:

rvm requirements
Requirements installation successful.

Step 2 – Install Ruby with RVM on AlmaLinux 9

Now you can check for the latest version available of Ruby with the following RVM command:

rvm list known
# MRI Rubies
[ruby-]1.8.7[-head] # security released on head

As you can see, the latest version of Ruby is version 3.1.4. To install it, simply run the command below:

rvm install ruby 3.1.4

This may take some time to complete. When it is completed, verify your Ruby installation by checking its version on AlmaLinux 9:

ruby --version
ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81) [x86_64-linux]

Also, you can check for your RVM version:

rvm version
rvm 1.29.12-next (master) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin []

Sep 3 – Install Rails with Gem

Gem is a library that contains a specific piece of functionality as well as any files or assets related to that functionality in Ruby. At this point, you can easily use Gem to install the Rails:

gem install rails
35 gems installed

Verify your Rails installation by checking its version:

rails --version

For more information, you can visit the Ruby on Rails guides.


At this point, you have learned to Install Ruby on Rails by using the RVM (Ruby Version Manager) on AlmaLinux 9. Now you can write your programs with Ruby on Rails the most powerful application platform.

Hope you enjoy it. You may be interested in these articles:

How To Set up Ruby on Rails on Rocky Linux 8

How To Install Portainer on AlmaLinux 9

How To Upgrade MariaDB on AlmaLinux 9


Please enter your comment!
Please enter your name here

Latest Articles


Most Popular