Skip to content
Related Articles

Related Articles

How to Install RubyGems on Linux?

View Discussion
Improve Article
Save Article
Like Article
  • Last Updated : 16 Dec, 2021

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

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!