rubygems-update error when I run gem update --system

Eric Garcia's Avatar

Eric Garcia

30 May, 2017 03:24 PM

Trying to run gem update --system fails with error:

11:08:29 ▶ gem update --system
Updating rubygems-update
Successfully installed rubygems-update-2.6.12
Parsing documentation for rubygems-update-2.6.12
Done installing documentation for rubygems-update after 0 seconds
Parsing documentation for rubygems-update-2.6.12
Done installing documentation for rubygems-update after 0 seconds
Installing RubyGems 2.6.12
ERROR:  While executing gem ... (Errno::EACCES)
    Permission denied - /Library/Ruby/Site/2.0.0/rubygems/basic_specification.rb

I'm using rbenv to manage ruby, but those installs are failing also. Even though I have all the required dependencies:

ruby-build: use openssl from homebrew
Downloading ruby-2.4.1.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.1.tar.bz2
Installing ruby-2.4.1...
ruby-build: use readline from homebrew

BUILD FAILED (OS X 10.12.5 using ruby-build 20170523)

Inspect or clean up the working tree at /var/folders/dw/bqfqz30s3wvdd280mvft466r0000gn/T/ruby-build.20170530111943.77105
Results logged to /var/folders/dw/bqfqz30s3wvdd280mvft466r0000gn/T/ruby-build.20170530111943.77105.log

Last 10 log lines:
The Ruby yaml extension was not compiled.
ERROR: Ruby install aborted due to missing extensions
Configure options used:
  --prefix=/Users/engarcia/.rbenv/versions/2.4.1
  --with-openssl-dir=/usr/local/opt/openssl
  --with-readline-dir=/usr/local/opt/readline
  CC=clang
  CFLAGS= -O3 -Wno-error=shorten-64-to-32 
  LDFLAGS=-L/Users/engarcia/.rbenv/versions/2.4.1/lib 
  CPPFLAGS=-I/Users/engarcia/.rbenv/versions/2.4.1/include

GEM ENV

RubyGems Environment:
  - RUBYGEMS VERSION: 2.6.1
  - RUBY VERSION: 2.0.0 (2015-12-16 patchlevel 648) [universal.x86_64-darwin16]
  - INSTALLATION DIRECTORY: /Users/engarcia/.gem
  - USER INSTALLATION DIRECTORY: /Users/engarcia/.gem/ruby/2.0.0
  - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
  - EXECUTABLE DIRECTORY: /Users/engarcia/.gem/bin
  - SPEC CACHE DIRECTORY: /Users/engarcia/.gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /Library/Ruby/Site
  - RUBYGEMS PLATFORMS:
    - ruby
    - universal-darwin-16
  - GEM PATHS:
     - /Users/engarcia/.gem
     - /Users/engarcia/.gem/ruby/2.0.0
     - /Library/Ruby/Gems/2.0.0
     - /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /Users/engarcia/.rbenv/shims
     - /Users/engarcia/.rbenv/bin
     - /usr/local/bin
     - /Users/engarcia/.nvm/versions/node/v5.4.1/bin
     - /Users/engarcia/.gem/bin
     - /bin
     - /sbin
     - /usr/bin
     - /usr/local/sbin
     - /usr/local/bin
     - /Users/engarcia/.npm-global/bin
     - /usr/local/var/jenv/shims
     - /Users/engarcia/.rbenv/shims
     - /usr/local/bin
     - /Users/engarcia/.gem/bin
     - /bin
     - /sbin
     - /usr/bin
     - /usr/local/sbin
     - /usr/local/bin
     - /Users/engarcia/.npm-global/bin
     - /usr/local/var/jenv/shims
     - /usr/local/bin
     - /usr/bin
     - /bin
     - /usr/sbin
     - /sbin
     - /opt/X11/bin
     - /Library/Frameworks/Mono.framework/Versions/Current/Commands
     - /Users/engarcia/Library/Android/sdk/platform-tools
     - /Users/engarcia/Library/Android/sdk/tools
     - /Users/engarcia/Library/Android/sdk/platform-tools
     - /Users/engarcia/Library/Android/sdk/tools

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