1

My system is OSX 10.11.6.

I'm running into this error:

System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:959:in `read': Permission denied - /Library/Ruby/Gems/2.0.0/specifications/terminal-notifier-1.6.0.gemspec (Errno::EACCES)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:959:in `load'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:644:in `block (2 levels) in each_spec'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:643:in `each'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:643:in `block in each_spec'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:642:in `each'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:642:in `each_spec'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:658:in `each_normal'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:669:in `_all'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:822:in `each'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:253:in `find_all'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:253:in `matching_specs'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:277:in `to_specs'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:46:in `require'
from /usr/local/Homebrew/Library/Homebrew/download_strategy.rb:1:in `<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/Homebrew/Library/Homebrew/resource.rb:1:in `<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/Homebrew/Library/Homebrew/extend/pathname.rb:2:in `<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/Homebrew/Library/Homebrew/global.rb:3:in `<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/Homebrew/Library/Homebrew/brew.rb:14:in `<main>'

I have tried running brew doctor but I end up with the exact same error.

I have tried the solution in here: Cannot update brew in MAC OS X el capitan and keep getting a Load error with require. I have also tried reinstalling brew and I end up with the same error. Even if I type in brew, I get the same error. However, when I type brew update it will tell me that Already up-to-date.

I type in brew cleanup I get the same error.

What is wrong? Is it some permission issue?

Community
  • 1
  • 1
akcorp2003
  • 189
  • 1
  • 9
  • ack - I ran into this error today as well, brew and gem both borked. I'm running 10.12.3 - thought it might have something to do with running beta versions of Xcode, but looks like it's probably not given your version of macOS. Weird things I've done: 1. using Xcode beta, 2. accidentally install Jekyll using sudo? 3. not much else - I'm on a clean work-provided MBP. – Charles Martin Feb 17 '17 at 10:32
  • Were you able to just `chmod` that folder `/System/Library/Frameworks`? – akcorp2003 Feb 17 '17 at 15:14
  • The permissions for `specifications.rb` were: `-rw-r--r-- 1 root wheel 68489 13 Nov 2013 specification.rb` So I don't know how I could chmod to anything more useful. – Charles Martin Feb 18 '17 at 16:38
  • My ruby also mysteriously started working again. I restarted the whole system (which sort of crashed/locked up a bit while doing so), and still had the error, then after closing terminal and opening it again, it suddenly seemed to work again. Weird - still can't figure out what would cause this. Would be interesting to hear if other users have this specific issue and gather more info. – Charles Martin Feb 18 '17 at 16:40

1 Answers1

0

I have the same issue. File "/Library/Ruby/Gems/2.0.0/specifications/terminal-notifier-1.6.0.gemspec" has invalid permissions by some reason (read only for owner, not for group). It can be fixed by just adding read permission to group for this file like:

sudo chmod g+r /Library/Ruby/Gems/2.0.0/specifications/terminal-notifier-1.6.0.gemspec
Vyacheslav Enis
  • 1,676
  • 12
  • 17
  • Thanks for the reply! My ruby mysteriously started working again. I'm not sure if I did something like that to the folder, but it was probably like that (i.e. `chmod [folder path]`. – akcorp2003 Feb 16 '17 at 22:23