Upgrading RubyGems to the last compatible version

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