-Bash: /Usr/Local/Bin/Heroku: /Usr/Local/Bin/Ruby: Bad Interpreter: No Such File or Directory

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

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 /*

Can't install Rails on El Capitan

As per your suggestions to look in those other questions and after some more digging, I ended up limiting the error to Not a directory which led me to an rbenv issue that pointed me to the possibility of having /usr/local/bin at the head of my PATH after initializing rbenv. And, as jeremy writes, that's why invoking rails is finding the executable in /usr/local/bin/ instead of in /Users/michelfrechette/.rbenv/shims/. So I removed that line and problem solved!

Ruby on Rails: heroku database push

Heroku can't find Ruby. This is common if you're using RVM or something to manage your Ruby installations. How did you install Heroku, and how did you install Ruby?



Related Topics



Leave a reply



Submit