Rubygems-update requires Ruby version >= 2.3.0 [Fix]

Updated on November 11, 2021

I was trying to update rubygems and ended up with an error “Error installing rubygems-update: rubygems-update requires Ruby version >= 2.3.0“. Below is the command used to update RubyGems.

# gem update --system
Updating rubygems-update
ERROR: Error installing rubygems-update:
rubygems-update requires Ruby version >= 2.3.0.

Here’s my Ruby and Gem version

ruby 2.2.7p470
gem 2.6.11

Can you help me to fix this issue – Ravi

Fix error rubygems-update requires Ruby version >= 2.3.0

The gem update started failing after the RubyGems version 3.0.0 was released. Also RubyGems version 3.0.0 is only installable on Ruby version >= 2.3.

For Ruby version 2.2 & 2.2.10  you need to execute the below command.

# gem install "rubygems-update:<3.0.0" --no-document

On Windows machines,

gem update --system --conservative || (gem i "rubygems-update:~>2.7" --no-document && update_rubygems)

That’s it!

Reference

Was this article helpful?

Related Articles

Comments Leave a Comment

  1. cannot install cocoapods on mac

    sudo gem install cocoapods
    ERROR: Error installing cocoapods:
    There are no versions of i18n (= 1.6) compatible with your Ruby & RubyGems. Maybe try installing an older version of the gem you’re looking for?
    i18n requires Ruby version >= 2.3.0. The current ruby version is 2.2.0.

    which -a ruby
    /Users/Alex/.rvm/rubies/ruby-2.2.5/bin/ruby
    /usr/bin/ruby

Leave a Comment