Skip to content

Instantly share code, notes, and snippets.

@tkhoa2711
Last active May 21, 2016 18:10
Show Gist options
  • Save tkhoa2711/54cd5a51e14c4a34fafe9aa84eecaae6 to your computer and use it in GitHub Desktop.
Save tkhoa2711/54cd5a51e14c4a34fafe9aa84eecaae6 to your computer and use it in GitHub Desktop.
Fix errors with Homebrew/Ruby in Mac OS X El Capitan
# This script aims to fix errors similar to below:
#
# /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 ...
# from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
#
# The error is commonly stumbled upon in Mac OS X El Capitan.
# fix access permission issue with the new Mac's SIP process
sudo chown -R $(whoami):admin /usr/local
# try to reset/clean the directories
cd /usr/local
git reset --hard && git clean -df
cd -
# run doctor and update
brew doctor
brew update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment