2013-04-28 77 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

相關問題