我正在关注Hartl的ROR教程,我正在努力让我的数据库在Heroku上工作,但无济于事。当我运行以下命令时:
heroku run rake db:create
或
heroku run rake db:migrate
我收到以下错误:
Running `rake db:create` attached to terminal... up, run.5477
/usr/bin/env: ruby2.2: No such file or directory
Running `rake db:migrate` attached to terminal... up, run.5562
/usr/bin/env: ruby2.2: No such file or directory
我正在postgresql
和development
使用production
。这是我最近的提交https://github.com/Euklidian-Space/sample-app
以下是heroku日志:
2015-07-30T16:42:48.956556+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by gabriel.grover@gmail.com
2015-07-30T16:42:53.039994+00:00 heroku[run.5562]: Awaiting client
2015-07-30T16:42:53.090027+00:00 heroku[run.5562]: Starting process with command `bundle exec rake db:migrate`
2015-07-30T16:42:53.343439+00:00 heroku[run.5562]: State changed from starting to up
2015-07-30T16:42:55.633768+00:00 heroku[run.5562]: State changed from up to complete
2015-07-30T16:42:55.618985+00:00 heroku[run.5562]: Process exited with status 127
答案 0 :(得分:2)
在bin/bundle
,bin/rake
,bin/rails
和bin/setup
个文件中,每个文件的第一行都会显示#!/usr/bin/env ruby2.2
。将它们全部更改为#!/usr/bin/env ruby
。然后再尝试部署。