yannis assael | the blog

  • Home
  • About
  • Categories
    • Android
    • Computing
    • iOS
    • Machine Learning
    • MacOSX
  • GitHub
  • Mobile Apps
  • yannisassael.com


Homebrew: ruby bad interpreter: No such file or directory

Written by iassael on 03/06/2014. Posted in computing, macosx

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.

Comments (16)

  • Avatar

    iassael

    25/06/2014 at 2:56 pm | #

    https://gist.github.com/chrisb/4d6a09c6cc1ca2e1b14e

  • Avatar

    Johnny

    27/07/2014 at 8:38 pm | #

    Thanks! This is exactly what I was looking for.

  • Avatar

    Vanessa Böhner

    04/08/2014 at 1:56 pm | #

    Couldn’t resist the temptation, too… so: Thank you, brew works again!

  • Avatar

    Esteban Arango Medina

    15/08/2014 at 7:24 am | #

    THANK YOU VERY MUCH MAN!!

  • Avatar

    Walter

    20/10/2014 at 7:49 pm | #

    You’re the man! Thanks from Switzerland.

  • Avatar

    Dillon

    20/10/2014 at 8:53 pm | #

    After running this I am unable to “brew update” as we have altered a file…any ideas?

  • Avatar

    iassael

    20/10/2014 at 8:58 pm | #

    Any warning or error messages?

  • Avatar

    shuiyouren

    22/10/2014 at 2:39 pm | #

    Thank you very much!

  • Avatar

    Jacky Liang

    28/10/2014 at 1:05 pm | #

    Thank you!!

  • Avatar

    Beni

    29/10/2014 at 3:37 am | #

    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?

  • Avatar

    Beni

    29/10/2014 at 3:38 am | #

    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

  • Avatar

    Ranjith Ramachandra

    30/10/2014 at 8:13 am | #

    This is what you can do otherwise:

    cd /usr/local/Library
    git pull origin master

  • Avatar

    Sergei

    02/11/2014 at 2:26 am | #

    Thank you! Saved me.

  • Avatar

    Chris

    22/03/2015 at 10:42 pm | #

    Many thanks for sharing this! Saved me a headache!

  • Avatar

    Caleb MacDonald

    13/07/2015 at 3:29 am | #

    Nicely done, worked like a charm.

  • Avatar

    tony

    08/09/2015 at 12:55 pm | #

    I did this to solve the problem, anyway, have to find where the .git folder locates

    cd /usr/local
    git pull origin master

Leave a comment