How to install Ruby on Ubuntu 20.04 / Debian 10?

Windows Articles

How to install the Owncloud desktop client Ubuntu 20.04?

In this post, You will learn how to install the Owncloud desktop client on Ubuntu 20.04. Many users and...

How to finish a task and force to close a program in Windows 10

Hello! We use numerous applications in Windows 10 on a daily basis. However, these programs can fail and crash. That is, it...

How to install Android on a USB key

Hi! Android is a very versatile mobile operating system because it is based on Linux kernel and other open-source software, it can...

Microsoft releases emergency update.

Security is one of the fundamental issues for Microsoft in Windows 10. In fact, since it was launched, the company has changed...

How to remove Windows 10 network credentials

Hi! Every time you access a website using Windows 10, a lot happens. In fact, the system will store the credentials to...
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 Ubuntu 20.04 / Debian 10.

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 Ubuntu 20.04 / 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 Ubuntu 20.04 / Debian 10
1.- Getting RVM on Ubuntu 20.04 / 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 Ubuntu / Debian
3- Using RVM on Ubuntu / 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 Ubuntu 20.04 / Debian 10
4.- Install Ruby on Ubuntu 20.04 / 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 the Owncloud desktop client Ubuntu 20.04?

In this post, You will learn how to install the Owncloud desktop client on Ubuntu 20.04. Many users and...

How to finish a task and force to close a program in Windows 10

Hello! We use numerous applications in Windows 10 on a daily basis. However, these programs can fail and crash. That is, it...

How to install Android on a USB key

Hi! Android is a very versatile mobile operating system because it is based on Linux kernel and other open-source software, it can...

Microsoft releases emergency update.

Security is one of the fundamental issues for Microsoft in Windows 10. In fact, since it was launched, the company has changed...

How to remove Windows 10 network credentials

Hi! Every time you access a website using Windows 10, a lot happens. In fact, the system will store the credentials to...
x