How to install Ruby on Ubuntu 20.04 / Debian 10?

Windows Articles

How to install KVM on Debian 10?

Hello friends, in this post I will show you how to install KVM on Debian 10. KVM stands for...

How to open Windows 10 Mobility Center

Hello! There are many types of users of Windows 10. As it depends on the type of hardware used. That is, the...

Ubuntu 20.04.1 available

Canonical, the company led by Mark Shuttleworth, releases Ubuntu 20.04.1. It has a new image, with updates and security patches for the...

How to install Linux Kernel 5.8 on Ubuntu 20.04?

Upgrading the Linux Kernel can be a beneficial task, but it is always optional. Recently we talked about the Linux Kernel 5.8...

How to activate XPS Viewer in Windows 10

Hey, what's up! When working with Windows 10 we probably use a lot of files. Indeed, these files have many extensions. For...
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 KVM on Debian 10?

Hello friends, in this post I will show you how to install KVM on Debian 10. KVM stands for...

How to open Windows 10 Mobility Center

Hello! There are many types of users of Windows 10. As it depends on the type of hardware used. That is, the...

Ubuntu 20.04.1 available

Canonical, the company led by Mark Shuttleworth, releases Ubuntu 20.04.1. It has a new image, with updates and security patches for the...

How to install Linux Kernel 5.8 on Ubuntu 20.04?

Upgrading the Linux Kernel can be a beneficial task, but it is always optional. Recently we talked about the Linux Kernel 5.8...

How to activate XPS Viewer in Windows 10

Hey, what's up! When working with Windows 10 we probably use a lot of files. Indeed, these files have many extensions. For...