Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to update ruby file owned by OS

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?

like image 703
Thomas Mikhail Avatar asked Oct 24 '25 22:10

Thomas Mikhail


1 Answers

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.

like image 151
Niyu Avatar answered Oct 26 '25 11:10

Niyu