Open In App

How to Install RubyGems on Linux?

Improve
Improve
Like Article
Like
Save
Share
Report

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.

official rubygems page

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”.

Extracted Content of downloaded zip file

Extracted Content of downloaded zip file

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

gem --version
verifying rubygems installation

Command to check RubyGem’s Version


Last Updated : 16 Dec, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads