Upgrading RubyGems to the last compatible version

Posted . Visible to the public.

Running gem update --system will install the latest version of RubyGems. However the latest version might not be compatible with your current version of Ruby.

To install the latest version that is compatible with your Ruby:

  • Go to the version history Show archive.org snapshot and find the latest compatible version (any Ruby constraint can be found in the right sidebar)
  • Append that version to the update command. E.g. to install the latest version compatible with Ruby 2:
    gem update --system 3.4.22
    
Henning Koch
Last edit
Arne Hartherz
License
Source code in this card is licensed under the MIT License.
Posted by Henning Koch to makandra dev (2024-08-05 09:59)