2011-04-05 201 views
2

我有一個RoR應用程序在本地計算機上工作,但是當我將它發送到heroku時,它崩潰。錯誤日誌給出錯誤H10 &說:Heroku錯誤H10 - (應用程序崩潰)

$ heroku logs 




2011-04-05T10:37:32-07:00 heroku[web.1]: State changed from starting to crashed 
2011-04-05T10:37:39-07:00 heroku[rake.2]: State changed from created to starting 

2011-04-05T10:37:44-07:00 heroku[rake.2]: State changed from starting to up 
2011-04-05T10:37:48-07:00 heroku[rake.2]: State changed from up to complete 
2011-04-05T10:38:29-07:00 heroku[nginx]: GET/HTTP/1.1 | 94.67.108.192 | 795 | 
http | 503 
2011-04-05T17:38:30+00:00 heroku[router]: Error H10 (App crashed) -> GET vivid-l 
ight-27.heroku.com/favicon.ico dyno=none queue=0 wait=0ms service=0ms bytes=0 
2011-04-05T17:40:24+00:00 heroku[router]: Error H10 (App crashed) -> GET vivid-l 
ight-27.heroku.com/login dyno=none queue=0 wait=0ms service=0ms bytes=0 
2011-04-05T17:40:25+00:00 heroku[router]: Error H10 (App crashed) -> GET vivid-l 
ight-27.heroku.com/favicon.ico dyno=none queue=0 wait=0ms service=0ms bytes=0 
2011-04-05T17:40:36+00:00 heroku[router]: Error H10 (App crashed) -> GET vivid-l 
ight-27.heroku.com/pages/api dyno=none queue=0 wait=0ms service=0ms bytes=0 
2011-04-05T10:40:37-07:00 heroku[nginx]: GET /pages/api HTTP/1.1 | 94.67.108.192 
| 796 | http | 503 
2011-04-05T17:40:37+00:00 heroku[router]: Error H10 (App crashed) -> GET vivid-l 
ight-27.heroku.com/favicon.ico dyno=none queue=0 wait=0ms service=0ms bytes=0 
2011-04-05T10:47:31-07:00 heroku[web.1]: State changed from crashed to created 
2011-04-05T10:47:31-07:00 heroku[web.1]: State changed from created to starting 
2011-04-05T10:47:39-07:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/ruby 
gems.rb:779:in `report_activate_error': Could not find RubyGem oauth (>= 0.3.5) 
(Gem::LoadError) 
2011-04-05T10:47:39-07:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/site_ruby/1 
.8/rubygems.rb:214:in `activate' 
2011-04-05T10:47:39-07:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/site_ruby/1 
.8/rubygems.rb:249:in `activate' 
2011-04-05T10:47:39-07:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/site_ruby/1 
.8/rubygems.rb:248:in `each' 
2011-04-05T10:47:39-07:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/site_ruby/1 
.8/rubygems.rb:248:in `activate' 
2011-04-05T10:47:39-07:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/site_ruby/1 
.8/rubygems.rb:1082:in `gem' 
2011-04-05T10:47:39-07:00 app[web.1]: from /app/app/controllers/comments_contr 
oller.rb:1 
2011-04-05T10:47:39-07:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/site_ruby/1 
.8/rubygems/custom_require.rb:31:in `gem_original_require' 
2011-04-05T10:47:39-07:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/site_ruby/1 
.8/rubygems/custom_require.rb:31:in `require' 
2011-04-05T10:47:39-07:00 app[web.1]: from /app/.gems/gems/activesupport-2.3.5 
/lib/active_support/dependencies.rb:158:in `require' 
2011-04-05T10:47:39-07:00 app[web.1]: from /app/.gems/gems/activesupport-2.3.5 
/lib/active_support/dependencies.rb:265:in `require_or_load' 
2011-04-05T10:47:39-07:00 app[web.1]: from /app/.gems/gems/activesupport-2.3.5 
/lib/active_support/dependencies.rb:224:in `depend_on' 
2011-04-05T10:47:39-07:00 app[web.1]: from /app/.gems/gems/activesupport-2.3.5 
/lib/active_support/dependencies.rb:136:in `require_dependency' 
2011-04-05T10:47:39-07:00 app[web.1]: from /app/.gems/gems/rails-2.3.5/lib/ini 
tializer.rb:414:in `load_application_classes' 
2011-04-05T10:47:39-07:00 app[web.1]: from /app/.gems/gems/rails-2.3.5/lib/ini 
tializer.rb:413:in `each' 
2011-04-05T10:47:39-07:00 app[web.1]: from /app/.gems/gems/rails-2.3.5/lib/ini 
tializer.rb:413:in `load_application_classes' 
2011-04-05T10:47:39-07:00 app[web.1]: from /app/.gems/gems/rails-2.3.5/lib/ini 
tializer.rb:411:in `each' 
2011-04-05T10:47:39-07:00 app[web.1]: from /app/.gems/gems/rails-2.3.5/lib/ini 
tializer.rb:411:in `load_application_classes' 
2011-04-05T10:47:39-07:00 app[web.1]: from /app/.gems/gems/rails-2.3.5/lib/ini 
tializer.rb:197:in `process' 
2011-04-05T10:47:39-07:00 app[web.1]: from /app/.gems/gems/rails-2.3.5/lib/ini 
tializer.rb:113:in `send' 
2011-04-05T10:47:39-07:00 app[web.1]: from /app/.gems/gems/rails-2.3.5/lib/ini 
tializer.rb:113:in `run' 
2011-04-05T10:47:39-07:00 app[web.1]: from /app/config/environment.rb:9 
2011-04-05T10:47:39-07:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/site_ruby/1 
.8/rubygems/custom_require.rb:31:in `gem_original_require' 
2011-04-05T10:47:39-07:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/site_ruby/1 
.8/rubygems/custom_require.rb:31:in `require' 
2011-04-05T10:47:39-07:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/gems/1.8/ge 
ms/thin-1.2.6/lib/rack/adapter/rails.rb:42:in `load_application' 
2011-04-05T10:47:39-07:00 app[web.1]: from /home/heroku_rack/heroku.ru:1:in `n 
ew' 
2011-04-05T10:47:39-07:00 app[web.1]: from /home/heroku_rack/heroku.ru:1 
2011-04-05T10:47:39-07:00 heroku[web.1]: State changed from starting to crashed 
2011-04-05T10:57:34-07:00 heroku[web.1]: State changed from crashed to created 
2011-04-05T10:57:34-07:00 heroku[web.1]: State changed from created to starting 
2011-04-05T10:57:39-07:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/gems/1.8/ge 
ms/rack-1.0.1/lib/rack/builder.rb:46:in `map' 
2011-04-05T10:57:39-07:00 app[web.1]: from /home/heroku_rack/heroku.ru:18 
2011-04-05T10:57:39-07:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/gems/1.8/ge 
ms/rack-1.0.1/lib/rack/builder.rb:29:in `instance_eval' 
2011-04-05T10:57:39-07:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/gems/1.8/ge 
ms/rack-1.0.1/lib/rack/builder.rb:29:in `initialize' 
2011-04-05T10:57:39-07:00 app[web.1]: from /home/heroku_rack/heroku.ru:11:in ` 
new' 
2011-04-05T10:57:39-07:00 app[web.1]: from /home/heroku_rack/heroku.ru:11 
2011-04-05T10:57:39-07:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/gems/1.8/ge 
ms/rack-1.0.1/lib/rack/builder.rb:29:in `instance_eval' 
2011-04-05T10:57:39-07:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/gems/1.8/ge 
ms/rack-1.0.1/lib/rack/builder.rb:29:in `initialize' 
2011-04-05T10:57:39-07:00 app[web.1]: from /home/heroku_rack/heroku.ru:1:in `n 
ew' 
2011-04-05T10:57:39-07:00 app[web.1]: from /home/heroku_rack/heroku.ru:1 
2011-04-05T10:57:40-07:00 heroku[web.1]: State changed from starting to crashed 
2011-04-05T18:01:44+00:00 heroku[router]: Error H10 (App crashed) -> GET vivid-l 
ight-27.heroku.com/ dyno=none queue=0 wait=0ms service=0ms bytes=0 
2011-04-05T18:01:44+00:00 heroku[router]: Error H10 (App crashed) -> GET vivid-l 
ight-27.heroku.com/favicon.ico dyno=none queue=0 wait=0ms service=0ms bytes=0 
2011-04-05T11:01:45-07:00 heroku[nginx]: GET /favicon.ico HTTP/1.1 | 94.67.108.1 
92 | 796 | http | 503 
2011-04-05T11:07:13-07:00 heroku[rake.3]: State changed from created to starting 

2011-04-05T11:07:19-07:00 heroku[rake.3]: State changed from starting to up 
2011-04-05T11:07:21-07:00 heroku[rake.3]: State changed from up to complete 
2011-04-05T18:07:43+00:00 heroku[router]: Error H10 (App crashed) -> GET vivid-l 
ight-27.heroku.com/ dyno=none queue=0 wait=0ms service=0ms bytes=0 
2011-04-05T11:07:44-07:00 heroku[nginx]: GET/HTTP/1.1 | 94.67.108.192 | 795 | 
http | 503 
2011-04-05T18:07:44+00:00 heroku[router]: Error H10 (App crashed) -> GET vivid-l 
ight-27.heroku.com/favicon.ico dyno=none queue=0 wait=0ms service=0ms bytes=0 
2011-04-05T11:07:44-07:00 heroku[nginx]: GET /favicon.ico HTTP/1.1 | 94.67.108.1 
92 | 796 | http | 503 

有沒有人有這個,並瞭解可能導致該 問題?

謝謝。

+0

你之前有什麼嗎? – 2011-04-05 18:26:18

+1

我曾這樣:2011-04-05T10:37:09-07:00 app [web.1]:遺失rails 2.3.5 gem。請'gem i nstall -v = 2.3.5 rails',更新您在已安裝的Rails版本的config/environm ent.rb中的RAILS_GEM_VERSION設置,或者註釋掉RAILS_GEM_VER SION以使用安裝的最新版本。 – Lamp 2011-04-05 18:42:02

回答

3

的錯誤是在日誌中:

gems.rb:779:in `report_activate_error': Could not find RubyGem oauth (>= 0.3.5) 

你可能使用軌道2.3,並且需要的OAuth添加到您的.gems文件。

+0

我正在使用包含oauth寶石的twitter gem。 – Lamp 2011-04-05 18:53:24

+0

任何想法如何清除日誌? – Lamp 2011-04-05 18:55:36

+1

我會明確地將它添加到您的.gems文件。那就是問題所在。 – 2011-04-05 19:35:39

0
heroku gem install v=2.3.5 rails 
+0

我有rail rails gem(2.3.5) – Lamp 2011-04-05 18:54:08

+0

註釋掉rail.rb中的rails版本 – 2011-04-05 20:03:18

+0

我該如何清除日誌? – Lamp 2011-04-05 20:31:21

1

問題解決了!

由於Rails 2.3.5及更舊版本與Rack 1.1.0不兼容,我的應用程序無法啓動。 twitter gem依賴與機架衝突,所以我在.gems上指定了--ignore-dependencies標誌來忽略Rack,並將其他依賴項添加到.gems手冊。

它們分別是:

oauth --version 0.3.5 
mash --version 0.0.3 --ignore-dependencies 
hoe --version 1.5.1 
httparty --version 0.4.3 

一切正常!

謝謝!

+1

嘿,很高興它的工作!您應該[將此答案標記爲已接受](http://meta.stackexchange.com/a/5235/189918),以便其他人可以看到您的問題已得到解決:) – culix 2012-09-07 21:42:12

相關問題