Advance

How to install Ruby on CentOS 8

How to install Ruby on CentOS 8
0
(0)

To introduce another web application, in this article, we are going to learn you how to install Ruby on CentOS 8. But first, what is ruby? it is a dynamic, multi-purpose, free, and open-source programming language that is usually used for the development of web applications. This high-level programming language helps maintain and continually improve the language for better and more efficient code. You can use it in diverse applications such as data analysis, custom database solutions, and prototyping to mention a few.

 

How to install Ruby on CentOS 8

Let’s walk through the steps of this guide, to show you How to install Ruby on CentOS 8.

 

Buy VPS Server

Recommended Article: Basic steps after purchase a Windows VPS Server

Install Ruby on CentOS 8 via Appstream Repository

You should fire up your terminal and update the system’s packages and repositories, install Ruby using the AppStream repo.

sudo dnf update

And to ensure the below-mentioned packages are installed, use the following command.

sudo dnf install gnupg2 curl tar

Finally, you can install Ruby from the Appstream repositories, by typing:

sudo dnf install @ruby  

When you are finished, verify the version of Ruby installed by running the command.

ruby --version  

 

 

Install Ruby on CentOS 8 using the RVM Manager

RVMRuby Version Manager is a versatile command-line tool and package manager, that allows you to install and manage multiple Ruby environments.

First download the RVM startup script as the root user, to install rvm.

Note: to run the following command, you need to switch from the regular to the root user.

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

Then, you would recognize that a new group rvm is being installed. As the installer no longer adds users to the rvm group automatically, you will receive its notification, and users need to do this by themselves. So, add the regular user to the rvm group when the installation is finished.

usermod -aG rvm eldernode

Then, run the following command to update the system environment variables.

source /etc/profile.d/rvm.sh  

Next, reload RVM.

rvm reload

You can install package requirements by typing:

rvm requirements

When you are sure of the installation success, check the various versions of Ruby that are available for download.

rvm list known

Run the command below, to install Ruby using the RVM manager.

Note: replace the latest version of Ruby with the highlighted below.

rvm install ruby 2.7.1  

Try to enjoy this break time, as this will take a while. And then, verify the version of Ruby when the installation is complete.

ruby --version

To reflect the latest version which was installed by the RVM manager, the version of Ruby has changed.

In case you need to make the above version the default for Ruby, you need to run:

rvm use 2.7.1 --default  

 

Good job! You finished the steps of installing Ruby. Also, you can read more to be an expert in CentOS 8.

Dear user, we hope you would enjoy this tutorial, you can ask questions about this training in the comments section, or to solve other problems in the field of Eldernode training, refer to the Ask page section and raise your problems in it.

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

TAGS:
View More Posts
Marilyn Bisson
Content Writer
Eldernode Writer
We Are Waiting for your valuable comments and you can be sure that it will be answered in the shortest possible time.

Leave a Reply

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

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way

+8595670151

7 days a week, 24 hours a day