如果“git push heroku master”失败怎么办?

时间:2013-04-28 22:25:48

标签: heroku ruby-on-rails-3.2

我的本​​地Windows XP计算机上有一个可用的Rails应用程序。我想在Heroku上传它。我按照本教程https://devcenter.heroku.com/articles/rails3

当我运行git push heroku master时,它失败了:

-----> Ruby/Rails app detected
-----> WARNING: Removing `Gemfile.lock` because it was generated on Windows.
       Bundler will do a full resolve so native gems are handled properly.
       This may result in unexpected gem versions being used in your app.
-----> Installing dependencies using Bundler version 1.3.2
       Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin
       Fetching gem metadata from https://rubygems.org/...........
       Fetching gem metadata from https://rubygems.org/..
       Resolving dependencies...
Received disconnect from 50.19.85.132: 10: user closed connection
fatal: The remote end hung up unexpectedly

我现在该怎么办?

我看到了日志,有一些像这些问题:

2013-04-28T21:18:03.384881+00:00 app[web.1]: /app/app/assets/images/cards/resize.rb:23:in `open': No such file or directory -
 C:\sbox\ruby\cards2 (Errno::ENOENT)

2013-04-28T21:18:03.385662+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:304:in
`wrapped_app'

2013-04-28T21:18:04.689716+00:00 heroku[web.1]: State changed from starting to crashed
2013-04-28T21:18:05.596424+00:00 heroku[web.1]: Process exited with status 1
2013-04-28T21:28:27.556270+00:00 heroku[web.1]: State changed from crashed to starting

2013-04-28T21:28:29.459229+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 3598`

2013-04-28T21:18:03.385424+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie/con
figurable.rb:30:in `method_missing'

2013-04-28T21:28:34.613321+00:00 app[web.1]:    from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie/con
figurable.rb:30:in `method_missing'

我删除了resize.rb:23文件。这是为了重新调整图像大小,应用程序不使用,我只是在开发时将其保留在那里,并在Heroku上传我的应用程序时忘记删除。在我的本地机器上它不是自己运行的,但Heroku由于某种原因启动它。有一个函数调用C:\sbox\ruby\cards2位置,这就是错误发生的原因,我想。好的,我删除了该文件。但是,不知道其他问题。

但我现在需要做什么?如何重新开始这个过程?我再次跑git push heroku master但得到了:

C:\sbox\ruby\Sites\Heroku\Cards>git push heroku master
Everything up-to-date

没有任何作用,但Heroku说一切都是最新的。

有没有办法在Heroku服务器上查看我在共享主机上查看文件的所有应用程序文件?

1 个答案:

答案 0 :(得分:3)

尝试使用一些小的更改添加提交,例如自述更改或其他内容。它应该强制heroku重新部署你的应用程序。