Warning: I’m assuming if you have homebrew installed then you are familiar with the command line. If you aren’t familiar, don’t attempt this or ask someone that is.
Apple updated Ruby from 1.8 to 2.0 in Yosemite, so homebrew might not work and you’ll see an error like this:
/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
If you haven’t upgraded to Yosemite yet, run
brew update first, and I think that will patch the Yosemite/2.0 issue.
If you have already updated, you’ll need to cheat a symlink to trick home-brew into thinking you are using 1.8 still. Run these commands:
$ cd /System/Library/Frameworks/Ruby.framework/Versions $ sudo ln -s Current 1.8 $ brew update
Once that’s done, you should remove your symlink:
$ sudo rm 1.8
9 replies on “Ruby/Homebrew breaking with OS X 10.10 Yosemite Upgrade”
Thank you so much! Saved my a….s 🙂
this does not work for me. I’m using the latest update to yosemite, and all I get when I try and update after comand 2 in the list is that you should be running lephard and higher. No update takes place, I think they might have broken something else as I know a bit abou the terminal. and I don’t thinK i broke it.
Thanks, Dude. This is awesome. it fixed my issue.
worked for me. Thanks!
$ sudo ln -s Current 1.8
$ brew update
/usr/local/Library/brew.rb:18:in `’: undefined method `help?’ for [“update”]:Array (NoMethodError)
I just get this…(no matter what command just switch out “update” with the command)
Understood what was going on, but you publishing the fixing code saved me wasting a day. So thanks for your solution!
In my case, I ran the following command
/System/Library/Frameworks/Ruby.framework/Versions && sudo ln -s 2.0 1.8
and then I could run
If you hit the OS version problem when attempting this, the fix is documented in this post – http://stackoverflow.com/questions/26501126/homebrew-on-macyosemite-not-working
Thank you, this worked perfectly for me.