Read more

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

Arne Hartherz
January 17, 2012Software engineer at makandra GmbH

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

Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

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.

Posted by Arne Hartherz to makandra dev (2012-01-17 16:49)