gems broken on mac OS X (Sierra)

Matt Whillock's Avatar

Matt Whillock

21 May, 2017 08:09 AM


Tried to update gem:

Sirenia:$ gem update --system
Updating rubygems-update
Fetching: rubygems-update-2.6.12.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.

Er, should I use sudo?

Sirenia:$ sudo gem update --system
Updating rubygems-update
ERROR: While executing gem ... (Errno::EPERM)
    Operation not permitted - /usr/bin/update_rubygems

Thought I need to upgrade as Homebrew was failing to install, update and doctor, all with a missing ruby require. Can anyone shed some light on this please?



  1. 1 Posted by Bert on 22 May, 2017 11:33 AM

    Bert's Avatar

    It looks like you are trying to use the system Ruby (ruby coming with OSX pre installed).

    This is not recommended for the exact problem you are seeing. Best is to use RVM or rbenv to manage specific ruby versions for yourself.

    I think it's now also possible to install a separate ruby version from bundler, although I have no experience with that.


  2. 2 Posted by Matthew Whilloc... on 22 May, 2017 04:50 PM

    Matthew Whillock's Avatar

    Hi Bert,

    That’s good to know, thanks a lot. I’ll try them out; it will certainly be easier than a Sierra re-install which is what I was considering.

    Thanks again.


  3. kerrizor closed this discussion on 28 Dec, 2017 01:25 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac