Voglio installare una gemma. Le istruzioni suggeriscono strongmente che io uso Homebrew per installare le dipendenze gem. Non ho usato molto Homebrew, forse una volta anni fa. Ricordo che El Capitan l'ha già installato. Ho anche ricordato i comandi "brew doctor" e "brew update". Per prima cosa ho eseguito brew update
e ho ottenuto il seguente errore:
[~]$ brew update
warning: unable to unlink CONTRIBUTING.md: Permission denied
warning: unable to unlink SUPPORTERS.md: Permission denied
fatal: cannot create directory at '.github': Permission denied
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master
Non avevo idea dei dettagli di questo errore, quindi ho deciso di provare sudo brew update
. Ho ricevuto il seguente errore.
[~]$ sudo brew update
sudo: /private/etc/sudoers.d is owned by uid 501, should be 0
Password:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in 'require': cannot load such file -- mach (LoadError)
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/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/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/Library/brew.rb:15:in '<main>'
Poi ho deciso di eseguire brew doctor
. Ho ricevuto il seguente errore.
[~]$ brew doctor
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in 'require': cannot load such file -- mach (LoadError)
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/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/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/Library/brew.rb:15:in '<main>'
Suppongo che la versione 2.0.0 di Ruby sia la versione di Ruby che il mio Mac Mini Server utilizza per il sistema operativo. Sto usando una versione più recente di Ruby con Ruby Version Manager per le mie applicazioni Ruby on Rails.
L'ultima volta che ho usato Homebrew era o con Mavericks o Mountain Lion. Non ho idea di dove andare da qui per risolvere questo problema. Nessuno della documentazione che ho trovato online affronta questo specifico errore.