gems broken on mac OS X (Sierra)

Matt Whillock's Avatar

Matt Whillock

21 May, 2017 08:09 AM

Hi,

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
Password:
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?

Thanks.

Cheers,
Matt

  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.

    Links:

  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.

    Cheers,
    Matt

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? 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