Categories
Troubleshooting Tutorials

Ruby/Homebrew breaking with OS X 10.10 Yosemite Upgrade

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

By Ryan Tvenge

I'm a web developer and co-owner of Hoverboard that makes cool stuff on the web.

9 replies on “Ruby/Homebrew breaking with OS X 10.10 Yosemite Upgrade”

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.

$ 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

brew update

Leave a Reply

Your email address will not be published. Required fields are marked *

Tvenge Design