How to install Ruby on Debian 10?

Windows Articles

How to install Android on a PC with Phoenix OS

Hello! Android is the most widely used mobile operating system in the world. Indeed, this Linux-based system has a large market share....

How to install Apache Maven on OpenSUSE 15.2 / 15.1?

In this post, we will show you how to install Apache Maven on OpenSUSE 15.2 / 15.1. To manage projects done in Java, there is...

How to install SQLite on OpenSUSE 15.2 / 15.1?

There are many good database management systems, but they are not all the same. And the fact that they are not, means...

How to detect port scanning and private IP access with Behave

Hello! Security when surfing the internet is a very serious issue. Consequently, the precautions we take are very important. Moreover, web browsers...

How to install LAMP on OpenSUSE 15.2 / 15.1?

It is increasingly common to find small companies that decide to use the SUSE ecosystem for their servers. It's an unsurprising decision because OpenSUSE...
angeloma
angeloma
Senior Writer and partner

Ruby is one of those programming languages that may be a little underestimated. However, it is a robust, multipurpose, open-source language that stands out for its efficiency in coding applications. So, in this post, you will learn how to install Ruby on Debian 10.

Ruby, as well as many other languages, can be installed in Debian using the official repositories. However, we are already close to the first year of Debian 10 and this implies that all the programs have been updated or improved. So the easiest and safest way to install Ruby on Debian 10 is using RVM.

According to the project’s own website, RVM (Ruby version manager), RVM is a command-line tool that allows you to easily install, manage, and work with multiple ruby environments from interpreters to sets of gems. In short, with this tool, you can easily install different versions of Ruby on any system.

By using RVM, you have the main advantage of being able to install the latest stable version of the language. As mentioned earlier, we can install different versions of Ruby.

Install Ruby on Debian 10

So the first thing we have to do is open a terminal and install some necessary packages before starting the installation.

:~$ sudo apt install gnupg curl

As you can see, these packages include curl which will be in charge of downloading RVM.

To do this, run this command which will download RVM and then run it.

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

1.- Getting RVM on Debian 10
1.- Getting RVM on Debian 10

Then make RVM available as a command by refreshing the user profile.

:~$ source /home/angelo/.rvm/scripts/rvm

To prove that everything went well, just show the version of RVM installed.

:~$ rvm -v
rvm 1.29.10-next (master) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]

2.- RVM installed
2.- RVM installed

Now we can show you all the versions of Ruby available for installation.

:~$ rvm list known

3- Using RVM on Debian
3- Using RVM on Debian

As you can see, there are several. However, at the time of writing this post, the last available stable version is 2.7.1 so we’ll install it:

:~$ rvm install ruby-2.7.1

4.- Install Ruby on Debian 10
4.- Install Ruby on Debian 10

RVM can handle several versions of Ruby on one system. So we need to set which one will be the major version.

:~$ rvm --default use ruby-2.7.1

Then, display the version of Ruby with the following command:

:~$ ruby -v

In this case, Ruby is already installed and ready to start work.

If you ever want to uninstall it, just run the following command:

:~$ rvm remove ruby-2.7.1

This completes the whole process. So, enjoy it.

Conclusion

Ruby is a pretty powerful language. It seems to be given little credit, but it is still widely used and large server applications, as well as scripts, are developed with this language.

Please share this post and join our Telegram channel.

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

How to install Android on a PC with Phoenix OS

Hello! Android is the most widely used mobile operating system in the world. Indeed, this Linux-based system has a large market share....

How to install Apache Maven on OpenSUSE 15.2 / 15.1?

In this post, we will show you how to install Apache Maven on OpenSUSE 15.2 / 15.1. To manage projects done in Java, there is...

How to install SQLite on OpenSUSE 15.2 / 15.1?

There are many good database management systems, but they are not all the same. And the fact that they are not, means...

How to detect port scanning and private IP access with Behave

Hello! Security when surfing the internet is a very serious issue. Consequently, the precautions we take are very important. Moreover, web browsers...

How to install LAMP on OpenSUSE 15.2 / 15.1?

It is increasingly common to find small companies that decide to use the SUSE ecosystem for their servers. It's an unsurprising decision because OpenSUSE...