Heroku App Crash H10 - bash:bin / rails:没有这样的文件或目录

时间:2013-07-17 16:02:29

标签: ruby-on-rails ruby heroku

我的部署存在问题。我的测试env本地工作很好,没有错误。当我推到Heroku时,我得到了这个:

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=

我不确定在哪里调用bin / rails或如何解决这个问题。我在H10的任何其他地方都找不到任何相关信息。这就像我是唯一一个经历过这种情况的人(不太可能......)!

我很感激任何见解或帮助。谢谢!

3 个答案:

答案 0 :(得分:37)

您错过了在Rails 4中添加的bin文件夹。运行rake rails:update:bin创建它,然后进行提交并推送到Heroku。

答案 1 :(得分:4)

我找到了问题的解决方案 - 这很简单:

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

我在这里找到了解决方案:https://devcenter.heroku.com/articles/ruby-versions

答案 2 :(得分:2)

添加路径不一定会有所帮助,因为它正在寻找一个“bin”'项目目录下的目录,现在是rails 4下的标准目录。有关详细信息,请参阅"bin/rails: No such file or directory" w/ Ruby 2 & Rails 4 on Heroku下的答案。