Homebrew fix for OSX 10.10 Yosemite

Now that Apple's desktop OS is available in beta to everyone, there are bound to be a lot of people upgrading between now and the official release date of 21 October (unconfirmed). Having updated in the office to the latest beta, we found one of our most used bits of kit, Homebrew, was not working. But fear not, it is a simple change!

 
Homebrew fix for OSX 10.10 Yosemite
 

Now that Apple's desktop OS is available in beta to everyone, there are bound to be a lot of people upgrading between now and the official release date of 21 October (unconfirmed).

Having updated in the office to the latest beta, we found one of our most used bits of kit, Homebrew, was not working. But fear not, it is a simple change!

Yosemite has been released with Ruby 2.0 installed, whereas Homebrew is set up to run with version 1.8.

The following steps should help you get back on track:

1. You need to update the brew.rb file using the following command on the command line:

vi /usr/local/Library/brew.rb

2. You then need to update the first line in the document 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

3. Finally, you need to commit those changes before you can 'brew update':

cd $(brew --repository)/Library && git commit -a -m 'Update for new Ruby version 2.0'

Homebrew will now be updated to the latest current version of Ruby installed on your system and you can now 'brew update'. Happy brewing!

January
January