Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

bash

ruby

heroku

Whenever I open a new terminal window I now get:

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

Any idea as to why this is happening and how to get rid of it?

like image 482
Kyle Decot Avatar asked Oct 26 '11 18:10

Kyle Decot


2 Answers

Make sure the first line of the file /usr/local/bin/heroku is #!/path/to/ruby. You may need to change it from /usr/local/bin/ruby to /usr/bin/ruby, or if you cannot find the ruby executable, type which ruby or updatedb && locate ruby to find it.


If the above doesn't work...

Check your ~/.bashrc, ~/.inputrc~, /etc/bashrc, /etc/inputrc, /etc/profile for a line trying to execute /usr/local/bin/heroku.

Another idea is you might have this as one of your startup programs. Check in /etc/inittab for a line with /usr/local/bin/heroku.

If you still cannot find that line in any of those files you can run grep -iH heroku /*

like image 65
chown Avatar answered Nov 16 '22 02:11

chown


brew install wget
wget -qO- https://toolbelt.heroku.com/install.sh | sh
like image 43
Bruno Avatar answered Nov 16 '22 02:11

Bruno