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
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)