2

I expect to be schooled on this but have exhausted my Google searches and scant knowledge of how OS X finds a command.

I've been using heroku for years and for some reason today I get the result:

 /usr/local/bin/heroku: /usr/local/bin/ruby: bad interpreter: No such file or directory

The first line of /usr/local/bin/heroku yields:

 #!/usr/local/heroku/ruby/bin/ruby

and I have no ruby directory at that location, but comparing it to a previous working backup I've never had it there. Instead I use RVM that points to my current ruby.

which ruby

 /Users/sam/.rvm/rubies/ruby-2.0.0-p353/bin/ruby

So the next thing to try is which heroku

 /usr/local/bin//heroku

This throws me. Where is that extra path separator coming from? So here is the result of my echo $PATH

 /Users/sam/.rvm/gems/ruby-2.0.0-p353/bin:/Users/sam/.rvm/gems/ruby-2.0.0-p353@global/bin:/Users/sam/.rvm/rubies/ruby-2.0.0-p353/bin:/Users/sam/.rvm/bin:/usr/local/share/python:/usr/local/bin/:/usr/local/sbin:/usr/local/heroku/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/local/heroku/bin:/usr/bin:/usr/sbin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin

ruby -v

 ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-darwin12.5.0]

Changing out the first line of /usr/local/bin/ruby to the location of ruby rvm uses above errors out on the ruby commands in this file which is odd because I don't have trouble with ruby in any other capacity.

This is probably due to some goof I've done as this is a recent phenomenon. I have restarted recently (to try out the Yosemite partition) and that's the only thing I can thing of that changed in the environment. What other bit of info would help solve this issue?, thanx, sam

2
  • The extra / is coming because your PATH includes /usr/local/bin/ before listing /usr/local/bin (twice). Might want to look at the files that set your path (like ~/.bash_profile or ~/.bashrc) and clean out the redundancies. Aug 6, 2014 at 17:35
  • Yes, it was something added in PATH that I didn't see before. If you can turn your comment into an answer I'll happy accept it, thx.
    – sam452
    Aug 6, 2014 at 18:41

1 Answer 1

1

The extra / is coming because your PATH includes /usr/local/bin/ before listing /usr/local/bin (twice). Might want to look at the files that set your path (like ~/.bash_profile or ~/.bashrc) and clean out the redundancies.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .