0

I'm doing the Hartl RoR tutorial on Windows 7 and hopelessly stuck on Chapter 3 when it comes to pushing to Heroku. Getting the following error message:

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

Have spent a long time googling around, so naturally I peeked into the bin\bundle, \rails, and \rake files and for each, changed first line to be: #!/usr/bin/env ruby instead of #!/usr/bin/env ruby.exe

Then

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

Error persists! Initially I thought it might be because I was in the wrong folder, so I did all the "git" steps above back in the sample_app folder and tried to migrate again. Same error:

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

Help great appreciated!!

4

1 回答 1

0

@Mattherick 是对的,忘记在 heroku 上运行 db:migrate。哦!

于 2014-02-03T18:46:46.157 回答