繁体   English   中英

heroku运行rake db:Rails和mysql项目的迁移错误

[英]heroku run rake db:migrate error for rails and mysql project

我有一个项目与Rails 4.2和mysql数据库。 但是当我做heroku run rake db:migrate结果是:

Running `rake db:migrate` attached to terminal... up, run.1461
/usr/bin/env: ruby2.2: No such file or directory

而且我的.gitignore中没有bin。

在我的heroku日志中,我有两个错误:

heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=serene-ocean-1351.herokuapp.com request_id=a40f485d-e55e-4246-b863-a8b13a3b89fa fwd="199.189.106.136" dyno= connect= service= status=503 bytes=
heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=serene-ocean-1351.herokuapp.com request_id=3404e956-71db-4530-be1f-ce6f3f23a857 fwd="199.189.106.136" dyno= connect= service= status=503 bytes=

在项目的bin目录中查找文件,第一行将是

#!/usr/bin/env ruby2.2

您只需将其更改为

#!/usr/bin/env ruby

如果您刚刚升级到Rails 4,请尝试以下操作来更新Heroku的二进制文件以支持您的命令。

$ heroku run rake rails:update:bin --app serene-ocean-1351

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM