Shaun Stanislaus
Shaun Stanislaus

Reputation: 511

Homebrew path issue

How do I fix this path issue? I can't use brew command and I think I previously symlink to wrong location.

Master:~ shaunstanislaus$ ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go)
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/man/man1/brew.1

Press enter to continue
==> Downloading and Installing Homebrew...
remote: Counting objects: 82368, done.
remote: Compressing objects: 100% (39323/39323), done.
remote: Total 82368 (delta 56782), reused 65301 (delta 42220)
Receiving objects: 100% (82368/82368), 11.68 MiB | 1.59 MiB/s, done.
Resolving deltas: 100% (56782/56782), done.
From https://github.com/mxcl/homebrew
 * [new branch]      master     -> origin/master
HEAD is now at 2ea1a0e smpeg: depends on gtk
==> Installation successful!
You should run `brew doctor' *before* you install anything.
Now type: brew help
Master:~ shaunstanislaus$ brew doctor
-bash: /usr/local/bin/brew: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
Master:~ shaunstanislaus$ echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/Users/shaunstanislaus/Library/Application Support/GoodSync:/opt/local/bin:/opt/local/sbin:/usr/local/sbin:/Users/shaunstanislaus/.ec2/bin:/Users/shaunstanislaus/.rvm/bin

/usr/local/bin/brew: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory

Upvotes: 0

Views: 3162

Answers (1)

Zangetsu
Zangetsu

Reputation: 2015

Not everyone keeps the default system version of ruby. Many will rename this file and use the MacPorts ruby, or compile it by hand, in which case it may be in a different location. I recommend changing this so that it will look for the ruby executable in a different location if it's not in the default.

Visit http://linguisticlogic.wordpress.com/2010/11/27/homebrew-mac-osx-and-ruby/

just doing

sudo ln -s /opt/local/bin/ruby /usr/bin/ruby

may work !!!

Upvotes: 2

Related Questions