1
因此,我剛剛將我的網站部署到了heroku。在當地它顯得很好。我創建了一個名爲welcome的新控制器,並帶有索引視圖。我也更新了我的路線文件夾。現在我對我的網站 site當在heroku上部署網站時出現錯誤
這裏收到錯誤消息是我的Heroku的日誌,其中我認爲這個問題是一個文檔片斷:
less-cov2012-09-08T15:58:07+00:00 app[web.1]:
2012-09-08T15:58:07+00:00 app[web.1]: cache: [GET /] miss
2012-09-08T15:58:07+00:00 app[web.1]:
2012-09-08T15:58:07+00:00 heroku[router]: GET limitless-cove-5100.herokuapp.com/
dyno=web.1 queue=0 wait=0ms service=978ms status=500 bytes=643
這裏是整個日誌:
2012-09-08T16:09:15+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3
.2.1/lib/rails/rack/log_tailer.rb:14:in `call'
2012-09-08T16:09:15+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.1
/lib/rack/handler/webrick.rb:59:in `service'
2012-09-08T16:09:15+00:00 app[web.1]: /usr/local/lib/ruby/1.9.1/webrick/httpse
rver.rb:111:in `service'
2012-09-08T16:09:15+00:00 app[web.1]: /usr/local/lib/ruby/1.9.1/webrick/httpse
rver.rb:70:in `run'
2012-09-08T16:09:15+00:00 app[web.1]: /usr/local/lib/ruby/1.9.1/webrick/server
.rb:183:in `block in start_thread'
2012-09-08T16:09:15+00:00 app[web.1]:
2012-09-08T16:09:15+00:00 app[web.1]:
2012-09-08T16:09:15+00:00 app[web.1]: cache: [GET /] miss
2012-09-08T16:09:15+00:00 heroku[router]: GET limitless-cove-5100.herokuapp.com/
dyno=web.1 queue=0 wait=0ms service=6ms status=500 bytes=643
2012-09-08T16:09:21+00:00 app[web.1]:
2012-09-08T16:09:21+00:00 app[web.1]:
2012-09-08T16:09:21+00:00 app[web.1]: Started GET "/" for 66.241.75.198 at 2012-
09-08 16:09:21 +0000
2012-09-08T16:09:21+00:00 app[web.1]:
2012-09-08T16:09:21+00:00 app[web.1]: ActiveRecord::ConnectionNotEstablished (Ac
tiveRecord::ConnectionNotEstablished):
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:374:i
n `retrieve_connection'
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/connection_adapters/abstract/connection_specification
.rb:168:in `retrieve_connection'
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/connection_adapters/abstract/connection_specification
.rb:142:in `connection'
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/query_cache.rb:67:in `rescue in call'
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/query_cache.rb:61:in `call'
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:443:i
n `call'
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.1/lib/active_support/callbacks.rb:405:in `_run__3191546681124262833__cal
l__697506052572710704__callbacks'
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.1/lib/active_support/callbacks.rb:405:in `__run_callback'
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.1/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3
.2.1/lib/rails/rack/logger.rb:26:in `call_app'
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3
.2.1/lib/rails/rack/logger.rb:16:in `call'
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.1
/lib/rack/runtime.rb:17:in `call'
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.1/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/request_id.rb:22:in `call'
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/static.rb:53:in `call'
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.1
/lib/rack/methodoverride.rb:21:in `call'
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.1
/lib/rack/lock.rb:15:in `call'
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:136:in `forward'
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:245:in `fetch'
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:185:in `lookup'
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:66:in `call!'
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:51:in `call'
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3
.2.1/lib/rails/engine.rb:479:in `call'
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3
.2.1/lib/rails/application.rb:220:in `call'
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.1
/lib/rack/content_length.rb:14:in `call'
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3
.2.1/lib/rails/rack/log_tailer.rb:14:in `call'
2012-09-08T16:09:21+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.1
/lib/rack/handler/webrick.rb:59:in `service'
2012-09-08T16:09:21+00:00 app[web.1]: /usr/local/lib/ruby/1.9.1/webrick/httpse
rver.rb:111:in `service'
2012-09-08T16:09:21+00:00 app[web.1]: /usr/local/lib/ruby/1.9.1/webrick/httpse
rver.rb:70:in `run'
2012-09-08T16:09:21+00:00 app[web.1]: /usr/local/lib/ruby/1.9.1/webrick/server
.rb:183:in `block in start_thread'
2012-09-08T16:09:21+00:00 app[web.1]:
2012-09-08T16:09:21+00:00 app[web.1]:
2012-09-08T16:09:21+00:00 app[web.1]: cache: [GET /] miss
2012-09-08T16:09:21+00:00 heroku[router]: GET limitless-cove-5100.herokuapp.com/
dyno=web.1 queue=0 wait=0ms service=7ms status=500 bytes=643
2012-09-08T16:09:22+00:00 app[web.1]: cache: [GET /favicon.ico] miss, store
2012-09-08T16:09:22+00:00 heroku[router]: GET limitless-cove-5100.herokuapp.com/
favicon.ico dyno=web.1 queue=0 wait=0ms service=31ms status=200 bytes=0
2012-09-08T16:09:22+00:00 app[web.1]:
2012-09-08T16:09:22+00:00 app[web.1]:
2012-09-08T16:09:22+00:00 app[web.1]: Started GET "/apple-touch-icon-precomposed
.png" for 66.241.75.198 at 2012-09-08 16:09:22 +0000
2012-09-08T16:09:22+00:00 app[web.1]:
2012-09-08T16:09:22+00:00 app[web.1]: ActiveRecord::ConnectionNotEstablished (Ac
tiveRecord::ConnectionNotEstablished):
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:374:i
n `retrieve_connection'
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/connection_adapters/abstract/connection_specification
.rb:168:in `retrieve_connection'
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/connection_adapters/abstract/connection_specification
.rb:142:in `connection'
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/query_cache.rb:67:in `rescue in call'
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/query_cache.rb:61:in `call'
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activereco
rd-3.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:443:i
n `call'
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.1/lib/active_support/callbacks.rb:405:in `_run__3191546681124262833__cal
l__697506052572710704__callbacks'
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.1/lib/active_support/callbacks.rb:405:in `__run_callback'
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.1/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3
.2.1/lib/rails/rack/logger.rb:26:in `call_app'
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3
.2.1/lib/rails/rack/logger.rb:16:in `call'
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/request_id.rb:22:in `call'
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.1
/lib/rack/methodoverride.rb:21:in `call'
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.1
/lib/rack/runtime.rb:17:in `call'
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupp
ort-3.2.1/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.1
/lib/rack/lock.rb:15:in `call'
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack
-3.2.1/lib/action_dispatch/middleware/static.rb:53:in `call'
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:136:in `forward'
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:245:in `fetch'
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:185:in `lookup'
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:66:in `call!'
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3
.2.1/lib/rails/engine.rb:479:in `call'
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-cache
-1.2/lib/rack/cache/context.rb:51:in `call'
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3
.2.1/lib/rails/application.rb:220:in `call'
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.1
/lib/rack/content_length.rb:14:in `call'
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3
.2.1/lib/rails/rack/log_tailer.rb:14:in `call'
2012-09-08T16:09:22+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.1
/lib/rack/handler/webrick.rb:59:in `service'
2012-09-08T16:09:22+00:00 app[web.1]: /usr/local/lib/ruby/1.9.1/webrick/httpse
rver.rb:111:in `service'
2012-09-08T16:09:22+00:00 app[web.1]: /usr/local/lib/ruby/1.9.1/webrick/httpse
rver.rb:70:in `run'
2012-09-08T16:09:22+00:00 app[web.1]: /usr/local/lib/ruby/1.9.1/webrick/server
.rb:183:in `block in start_thread'
2012-09-08T16:09:22+00:00 app[web.1]:
2012-09-08T16:09:22+00:00 app[web.1]:
2012-09-08T16:09:22+00:00 app[web.1]: cache: [GET /apple-touch-icon-precomposed.
png] miss
2012-09-08T16:09:22+00:00 heroku[router]: GET limitless-cove-5100.herokuapp.com/
apple-touch-icon-precomposed.png dyno=web.1 queue=0 wait=0ms service=6ms status=
500 bytes=643
該部分日誌沒有錯誤。查找ruby stack跟蹤 – house9
您可能想要發佈一些實際的代碼,如果您部署了一些中斷的邏輯,那麼日誌消息並不是那麼有用。 – bojo
我添加了整個日誌 –