我正在Windows 7上做Hartl RoR教程,当涉及到推到Heroku时,它无可救药地陷入了第三章。获取以下错误消息:
C:\Sites\rails_projects\sample_app>heroku run rake db:migrate
Running `rake db:migrate` attached to terminal... up, run.7908
/usr/bin/env: ruby.exe: No such file or directory谷歌搜索了很长时间,所以我自然地窥视了bin\bundle、\rails和\rake文件,并将第一行改为:#!/usr/bin/env,而不是#!/usr/bin/bin/env ruby.exe
然后
C:\Sites\rails_projects\sample_app\bin>git commit -a -m "ruby.exe to ruby"
[static-pages 319c9af] ruby.exe to ruby
4 files changed, 5 insertions(+), 3 deletions(-)
C:\Sites\rails_projects\sample_app\bin>git push
warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:
git config --global push.default matching
To squelch this message and adopt the new behavior now, use:
git config --global push.default simple
See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)
Username:
Password:
Everything up-to-date
C:\Sites\rails_projects\sample_app\bin>git push heroku
Everything up-to-date
C:\Sites\rails_projects\sample_app\bin>cd C:\Sites\rails_projects\sample_app
C:\Sites\rails_projects\sample_app\heroku run rake db:migrate
Running `rake db:migrate` attached to terminal... up, run.7908
/usr/bin/env: ruby.exe: No such file or directory错误持续存在!最初认为这可能是因为我在错误的文件夹中,所以我在sample_app文件夹上执行了所有的"git“步骤,并试图再次迁移。同样的错误:
C:\Sites\rails_projects\sample_app>heroku run rake db:migrate
Running `rake db:migrate` attached to terminal... up, run.7039
/usr/bin/env: ruby.exe: No such file or directory帮助伟大的感激!
发布于 2014-02-03 18:46:46
@Mattherick是对的,忘了运行db:在heroku上迁移。哦哦!
https://stackoverflow.com/questions/18523940
复制相似问题