Upgrade and downgrade RubyGems

RubyGems  is a package management framework for Ruby. You need to have an installation of RubyGems before applying the following changes to your system. To make sure whether you have installed RubyGems or not, run this command:

joseph@admon:~$ gem -v
1.5.2

See Gem for information on RubyGems (or ‘ri Gem‘). More details about Gems can be found here at Introduction to RubyGems.

Here we’ll show some guidelines on how to downgrade and upgrade RubyGems to a specified version.

To upgrade to the latest RubyGems, it’s much simple, you just need to run:

gem update --system

To downgrade RubyGems to a specified version, we have two ways here.

1, With RubyGems 1.5.2 and higher version, run

gem update --system 1.3.7

2, With RubyGems 1.5.1 and lower versions, we can use rubygems-update to upgrade to a lower version. Before that, we need to install it:

gem install rubygems-update

Update_rubygems attempted to update to the most recently installed version. The downgrade steps can be described as below:

gem install rubygems-update -v=1.3.7
gem uninstall rubygems-update -v=1.5.2
update_rubygems

The last two commands can be “update_rubygems _1.3.7_” for short. It’s very useful when you face the following errors in Debian/Ubuntu:

gem update –system is disabled on Debian. RubyGems can be updated using the official Debian repositories by aptitude or apt-get.

If you faced any issues, do forget to ask a question at our support forum.

Share Button

2 thoughts on “Upgrade and downgrade RubyGems

Leave a comment

Your email address will not be published. Required fields are marked *