Homebrew: ruby bad interpreter: No such file or directory
After installing 10.10 DP1 Yosemite (yeah I couldn’t resist the temptation) homebrew gave me the following error:
/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
This error can easily be fixed in the following steps:
1) Open terminal
2) nano /usr/local/Library/brew.rb
3) In the first line change “1.8” to “Current”, so it should look like this:
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby -W0
Cheers~
Tags: 10.10, bad, brew, homebrew, interpreter, ruby, yosemite
Trackback from your site.
iassael
| #
https://gist.github.com/chrisb/4d6a09c6cc1ca2e1b14e
Johnny
| #
Thanks! This is exactly what I was looking for.
Vanessa Böhner
| #
Couldn’t resist the temptation, too… so: Thank you, brew works again!
Esteban Arango Medina
| #
THANK YOU VERY MUCH MAN!!
Walter
| #
You’re the man! Thanks from Switzerland.
Dillon
| #
After running this I am unable to “brew update” as we have altered a file…any ideas?
iassael
| #
Any warning or error messages?
shuiyouren
| #
Thank you very much!
Jacky Liang
| #
Thank you!!
Beni
| #
My brew.rb has the /Current/ instead the 1.8 and I have that exact problem still..
In the Versions folder. I do have a 1.8 and a 2.0 folder (though I have ruby 2.1.3p242 installed, rails 4.1.6 and rvm 1.25.34 (stable)
If I was to change “Current” with “1.8” I guess it would work!.. but I don’t think I should do that, should I?
Beni
| #
my bad forgot to say that my error message is this one:
/usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/brew: line 23: /usr/local/Library/brew.rb: Undefined error: 0
Ranjith Ramachandra
| #
This is what you can do otherwise:
cd /usr/local/Library
git pull origin master
Sergei
| #
Thank you! Saved me.
Chris
| #
Many thanks for sharing this! Saved me a headache!
Caleb MacDonald
| #
Nicely done, worked like a charm.
tony
| #
I did this to solve the problem, anyway, have to find where the .git folder locates
cd /usr/local
git pull origin master