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

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

Updated on November 11, 2021

Was this article helpful?

Related Articles

Leave a Comment