How to Install RubyGems on Linux?
RubyGems is a service for hosting gems of Ruby’s community. You can publish your own gem and host it on RubyGems. In this article, we will look into the process of installing RubyGems on a Linux system.
Installing RubyGems on Linux:
RubyGems can be downloaded from its official website and can be installed with the help of the following steps:
Step 1: In order to install RubyGems, first we need to install ruby on Linux. Run the following command on the terminal to install ruby.
sudo apt install ruby
Step 2: Go to the RubyGems download page and click on the zip button, this will download the zip through which you can install RubyGems.
Step 3: After Downloading the package, Open the folder where the zip file is located and unzip it by extracting its content, After Extracting move to the folder and open the folder on the terminal by clicking the right-click and tapping on “Open in Terminal”.
Step 4: In the Terminal run the following command:
sudo ruby setup.rb
To verify the installation run the following command to check the RubyGems version