Here is how to install Ruby on Ubuntu 20.04 in under two minutes:
Step 1 - Update the package list on your system
The first step is to update the package list on your system before proceeding to actual installation:
sudo apt update -y
apt update downloads the package lists from the repositories and updates them to get information on the newest versions of packages and their dependencies. It will do this for all repositories and PPAs.
Step 2 - Install
Now, install the Ruby using the built-in package manager using the following command:
sudo apt-get install ruby-full
You have successfully installed ruby on your system. To see if everything works fine, create a file that ends with
.rb and create a Hello world program:
puts "Hello World!"
Then try executing the file using the following command:
This will print
Hello world! into the terminal output.
We call you when your
website goes down
Get notified with a radically better
infrastructure monitoring platform.