How to install a specific version of RubyGems (and how to downgrade)

Updated . Posted . Visible to the public.

Sometimes you want one distinct version of RubyGems to be installed to replicate the same behavior across multiple servers.

Usually would do this to update your RubyGems, but this always takes you to the latest version:

gem update --system

While there are ways around the interwebs that use the rubygems-update package and call its setup.rb, there is an undocumented switch you can use:

gem update --system 1.3.7

This updates to the given version, 1.3.7 in the above case, by walking the rubygems-update package way itself.


Note that if you are trying to avoid API breakage, SlimGems Show archive.org snapshot probably is exactly what you need.

Arne Hartherz
Last edit
Henning Koch
License
Source code in this card is licensed under the MIT License.
Posted by Arne Hartherz to makandra dev (2012-01-17 15:49)