I have been on Snow Leopard for years. My mac book air is almost 4 years old and I don't think I've ever upgraded my OS. Now I'm falling really behind, but I've been reluctant to upgrade because it's going to be tedious and things will be broken everywhere. The tipping point is when I can't use phonegap to develop mobile app. Okay, now it IS the time to upgrade.
It happens to be the moment Yosemite officially released. How about just one step to the latest one? That seems to be a good idea. Right?
Just as I expected, things were broken everywhere. Luckily Yosemite beta version was out a while back (since June?). So there are some posts about fixes online already. I just need to piece them together and make it work. This post mainly talks about how to fix broken Homebrew.
-
Open file
Macintosh-2:~ future$ vi /usr/local/Library/brew.rb
Change the first line from:
#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -W0
to:
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby -W0
-
Commit the change (under brew repository directory)
git commit -a
-
Clean up all previous installation by:
rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
-
Install a fresh copy of Homebrew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
-
Run
brew update
Now, Homebrew is back in service!