The error message is as follows:
/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory/usr/local/bin/brew: line 23: /usr/local/Library/brew.rb: Undefined error: 0
The author explains as follows:
Mac OS X 10.10 (Yosemite) no longer ships with Ruby 1.8 (only 2.0 ). I have changed the brew. RB file to use the 'current' directory found in the ruby. framework folder. unless there is a specific reason to use 1.8, this shoshould prevent the issue abve when doing a OS upgrade.
I thought I could reinstall homebrew or upgrade Ruby to 2.0, But I didn't discuss it with them because someone directly posted a method. I passed the test and shared it:
cd /usr/local/Library/git branch –set-upstream-to=origin/master master# on branch mastergit pull
Of course, this method is to pull a brew from git again. Why is this method fast? If you try to reinstall brew, you will know that it is easier to pull the source code back to clear something.
Troubleshooting of homebrew errors after upgrading to Yosemite