HomeLinuxTips on how to Set up RubyGems on Ubuntu 22.04

Tips on how to Set up RubyGems on Ubuntu 22.04


RubyGems is a package deal supervisor for Ruby that permits customers to put in packages and libraries required for creating Ruby initiatives. It additionally helps customers in creating new functions or packages and managing them by means of gems. RubyGems is hosted by the Ruby neighborhood and it makes the set up of Gems easy on the system.

To put in RubyGems on the Ubuntu system, observe this text’s information.

Tips on how to Set up RubyGems on Ubuntu 22.04

The Ubuntu customers can set up RubyGems on the system from:

Methodology 1: Set up RubyGems on Ubuntu Via Repository

The Ubuntu official repository makes it easy for the customers to put in RubyGems on the system. Nevertheless, earlier than putting in any software or packages from the supply repository, the customers should guarantee updating the repository by means of the next command:

$ sudo apt replace && sudo apt improve -y

 

After updating Ubuntu repository, the customers can set up RubyGems on the system from the next command:

$ sudo apt set up rubygems -y

 

You may verify the RubyGems model on Ubuntu from the next command:

 

Methodology 2: Set up RubyGems on Ubuntu Manually Via tgz

The Ubuntu repository gained’t set up an up to date model of RubyGems on the system. Thus, it’s a must to manually set up an up to date model of RubyGems from the next steps talked about on this methodology.

Step 1: Guarantee Ruby is put in on the Ubuntu system and if not, the customers can use the next command to put in Ruby on Ubuntu.

$ sudo apt set up ruby -y

 

Word: The above steps set up RubyGems on Ubuntu too however it gained’t be the up to date model.

Step 2: It’s important to obtain the RubyGems newest model tgz supply file from the wget command on the terminal.

$ wget https://rubygems.org/rubygems/rubygems-3.4.6.tgz

 

Step 3: Extract the RubyGems supply file on Ubuntu by means of the next command:

$ tar -xf rubygems-3.4.6.tgz

 

Step 4: Navigate to RubyGems supply listing from the next command:

 

Step 5: Then use the next command to put in the newest model of RubyGems on the Ubuntu system.

 

Step 6: You may verify the set up of RubyGems newest model from the next command:

 

Conclusion

RubyGems can simply be put in by means of the official Ubuntu repository by way of the “apt” command. Nevertheless, it fails to put in the up to date model of RubyGems. The customers can select the handbook set up methodology to efficiently set up the up to date model of RubyGems on the Ubuntu system. The handbook methodology requires Ruby and the newest model tgz supply file, which might be downloaded on Ubuntu system from the “wget” command.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments