2013-04-28 74 views
2

我的本地Windows XP机器上有一个工作的Rails应用程序。我想在Heroku上传它。我按照这个教程https://devcenter.heroku.com/articles/rails3如果“git push heroku master”失败,该怎么办?

当我跑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服务器上看到我所有的应用程序文件,就像您可以在共享主机上看到您的文件一样?

回答

3

尝试通过一些小改动添加一个提交,就像Readme改变或其他东西。它应该强制heroku重新部署您的应用程序。

+0

哦,是的,这有帮助。谢谢。我有很多关于'运行:rake assets:precompile'的错误,但现在我知道如何继续。 – Green 2013-04-28 22:57:48

+2

我还没有测试过这个。但是我假设'git commit --allow-empty'会起作用,然后你不需要任意修改重新部署。 – 2013-04-29 16:25:08

+0

好点,Nathan! – gmile 2013-04-29 16:37:33

相关问题