I'm trying to update ruby on ubuntu using sudo gem update --system but keep getting the error:
Loading the rubygems/defaults/operating_system.rb file caused an error. This file is owned by your OS, not by rubygems upstream. Please find out which OS package this file belongs to and follow the guidelines from your OS to report the problem and ask for help. I tried
chown'ing the entire gems library but to no avail. What can I do?
This can happen if an old ruby version is created that .rb file. Usually it is located at
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb
Deleting it and trying to run
gem update --system
worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With