Ruby is an efficient, simple, and popular interpreted scripting language designed specifically to develop frontend, backend web applications. Not only web applications, Ruby is also famous among developers for creating automation tools, web scraping and crawling, DevOps, and data processing.
Install Ruby on Linux Mint 21
There are several ways to install Ruby on Linux Mint 21 system but we have picked the simplest ones that do not create any hurdles while performing:
1: Install Ruby using APT
We can directly install Ruby from the apt repository, for this upgrade the system packages repositories using the command:
Now, install Ruby, executing:
Run the version command:
2: Install Ruby Using rbenv Tool
It is a light-weighted and simple tool that is used to install different versions of Ruby.
To install Ruby on Linux Mint 21 system using rbenv utility, follow the steps carefully listed below:
Step 1: Update the system to let all the packages up-to-date using the command:
Step 2: In the next step, you need to download all the required prerequisites:
Step 3: Now download and run the shell script, executing:
Step 4: After installing shell script, now create a path to run rbenv environment, type in terminal:
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
source ~/.bashrc
Step 5: Verify the installation of rbenv tool in the Linux Mint 21 system by making use of the following command:
Step 6: Execute the mentioned command to display all the possible versions of Ruby that can be installed using rbenv tool:
Step 7: After the successful completion of each step, we have mentioned above, now, you can get Ruby on Linux Mint 21. If we want to install the Ruby 3.0.2 version then use:
Step 8: To confirm the Ruby installation, type in terminal:
3: Install Ruby Using Snap
You can also install Ruby via snap, for this use the command mentioned below:
But make sure snapd is installed on your system before installing Ruby through snap packages; read how to enable snap on Linux Mint. You can also uninstall it through the following command:
Conclusion
Ruby is popular object-oriented programming used to create small to large web frameworks and applications. Not only web applications, but Ruby is also famous among developers for creating automation tools, web scraping and crawling, DevOps, and data processing. This guide has demonstrated a brief explanation of how we can get Ruby on our Linux Mint 21 system. We have mentioned the three easiest ways from the several methods to let it install on the system.