Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku App Crash H10 - bash: bin/rails: No such file or directory [duplicate]

I am having an issue with my deployment. My test env locally works great with no errors. When I push to Heroku I get this:

2013-07-17T15:54:04.619297+00:00 app[web.1]: bash: bin/rails: No such file or directory
2013-07-17T15:54:07.240398+00:00 heroku[web.1]: Process exited with status 127
2013-07-17T15:54:07.255379+00:00 heroku[web.1]: State changed from starting to crashed
2013-07-17T15:54:13.467325+00:00 heroku[web.1]: Error R99 (Platform error) -> Failed to launch the dyno within 10 seconds
2013-07-17T15:54:13.467325+00:00 heroku[web.1]: Stopping process with SIGKILL
2013-07-17T15:54:58.714647+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=radiant-thicket-1062.herokuapp.com fwd="174.4.33.188" dyno= connect= service= status=503 bytes=

I am unsure where anything is calling bin/rails or how to solve this. I can't find any information on this anywhere else with the H10. It's like I'm the only person to ever experience this (unlikely..)!

I'd appreciate any insight or help. Thank you!

like image 609
bradm Avatar asked Jul 17 '13 16:07

bradm


3 Answers

You're missing the bin folder that was added in Rails 4. Run rake rails:update:bin to create it, then make a commit and push to Heroku.

like image 169
michael Avatar answered Oct 31 '22 13:10

michael


I found a solution to the problem - it's quite simple:

heroku config:set PATH=bin:vendor/bundle/ruby/2.0.0/bin:/usr/local/bin:/usr/bin:/bin

I found the solution here: https://devcenter.heroku.com/articles/ruby-versions

like image 5
bradm Avatar answered Oct 31 '22 13:10

bradm


Adding the path won't necessarily help as it's looking for a 'bin' directory under your project directory, which is standard now under rails 4. Go see the answers under "bin/rails: No such file or directory" w/ Ruby 2 & Rails 4 on Heroku for more information.

like image 2
user2697012 Avatar answered Oct 31 '22 14:10

user2697012