This article will provide you with different methods to install Ruby on Ubuntu 22.04.
There are three methods to install Ruby on Ubuntu 22.04 which are as following:
Rbnev is a command-line utility that allows you to install the latest version of Ruby
The following steps are required to install Ruby on Ubuntu 22.04 successfully.
Step 1: First update the Ubuntu apt package system using the following command:
Step 2: Next, install required dependencies and libraries for Ruby using the following command:
Step 3: Next, run the shell script file using the below-mentioned command:
Step 4: To start using Rbnev, you will need to update the path environment using the following shell script command:
Step 5: Once Rbnev installation is completed, you can then list the Ruby version using the following command.
Step 6: Now, use the following command to install the latest version of Ruby on Ubuntu:
Step 7: To set the installed version of Ruby as a global, execute the following command:
To confirm the latest Ruby version, use the following command.
You can also install Ruby through the built-in Ruby Version Manager (RVM). To perform the installation through this method, use the following steps.
Step 1: Update packages using the following command:
Step 2: Install required dependencies with the following command-line.
Step 3: Now, install RVM by executing the below-given command:
Step 4: Next, execute the following command to find out the available version on RVM:
As 3.1.2 is the latest version, so execute the following installation command to install the latest version of Ruby on Ubuntu:
The above command will successfully install Ruby on Ubuntu and you can begin creating different applications with ease by implementing code in Ruby language.
Ubuntu 22.04 repository also includes the Ruby which you can easily install using the following steps. However, it doesn’t install the latest version but still it’s the easiest method to install Ruby on Ubuntu.
Step 1: Update the apt package system using the following command:
Step 2: Then use the below-mentioned command to install Ruby on Ubuntu:
Step 3: After the Ruby installation is completed, you can then check the version using the following command.
To remove Ruby from Ubuntu 22.04 repository, execute the below-mentioned command.
Ruby is an open-source and robust programming language used to develop different web applications. There are several methods to install Ruby on Ubuntu 22.04 mentioned in this article. If you want to install the latest version of Ruby, you can pick the Rbnev or RVM method and to ease the installation, you can install Ruby through the apt command.
Canonical’s Kubernetes LTS (Long Term Support) will support FedRAMP compliance and receive at least 12…
Welcome to the Ubuntu Weekly Newsletter, Issue 878 for the week of February 2 –…
At Canonical, we firmly believe that delivering an outstanding, customer-centric support experience is impossible without…
I want to share how to install osTicket v1.14 for Ubuntu 20.04 server. osTicket written…
Now I want to share how to install WordPress on ubuntu 20.04 server. WordPress is…
Now I want to share the DNS server installation process on your Ubuntu 20.04 server.…