Heroku应用崩溃H10-bash:bin/rails:没有这样的文件或目录



我的部署有问题。我的测试环境在本地运行良好,没有任何错误。当我推到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/rrails,也不确定如何解决这个问题。我在H10的其他地方找不到任何关于这方面的信息。就好像我是唯一一个经历过这种事的人(不太可能…)!

如果有任何见解或帮助,我将不胜感激。非常感谢。

您缺少在Rails4中添加的bin文件夹。运行rake rails:update:bin创建它,然后提交并推送到Heroku。

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

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

添加路径不一定有帮助,因为它在项目目录下寻找一个"bin"目录,这是rails 4下的标准目录。去看";bin/rrails:没有这样的文件或目录";w/Ruby 2&Heroku上的Rails4了解更多信息。

最新更新