我推送我的應用程序到Heroku,並得到「我們很抱歉,但出了問題(500)」 這是爲什麼?我知道錯誤信息是來自我自己的/ public目錄中的一個文件,標題爲500.html,但我不知道爲什麼會發生這種情況。爲什麼我的應用程序推向Heroku時出現錯誤500「我們很抱歉,但出現了問題」?
我的heroku日誌如下以及我的mongoid.yml文件。謝謝。
Heroku的日誌:
2014-02-23T02:12:14.311710+00:00 heroku[router]: at=info method=GET path=/ host=danacamilleapp.herokuapp.com request_id=25556ae0-c4ac-40f7-8008-bd8860b87039 fwd="72.89.235.136" dyno=web.1 connect=27ms service=18ms status=500 bytes=932
2014-02-23T02:12:14.311277+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/mongoid-3.1.6/lib/mongoid/sessions.rb:171:in `collection'
2014-02-23T02:12:14.311277+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/mongoid-3.1.6/lib/mongoid/sessions.rb:137:in `with_name'
2014-02-23T02:12:14.311520+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/mongoid-3.1.6/lib/mongoid/contextual.rb:34:in `context'
2014-02-23T02:12:14.311277+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/mongoid-3.1.6/lib/mongoid/sessions/factory.rb:28:in `create'
2014-02-23T02:12:14.311277+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/mongoid-3.1.6/lib/mongoid/sessions/factory.rb:122:in `inject_ports'
2014-02-23T02:12:14.311520+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/mongoid-3.1.6/lib/mongoid/contextual/mongo.rb:260:in `initialize'
2014-02-23T02:12:14.311520+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.16/lib/active_support/callbacks.rb:405:in `__run_callback'
2014-02-23T02:12:14.311520+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/mongoid-3.1.6/lib/mongoid/contextual.rb:19:in `first'
2014-02-23T02:12:14.311698+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_controller/metal/rescue.rb:29:in `process_action'
2014-02-23T02:12:14.311520+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/mongoid-3.1.6/lib/mongoid/finders.rb:117:in `first'
2014-02-23T02:12:14.311520+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/locomotive_cms-2.4.1/lib/locomotive/routing/site_dispatcher.rb:23:in `fetch_site'
2014-02-23T02:12:14.311520+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.16/lib/active_support/callbacks.rb:429:in `_run__204668899024992162__process_action__4317869837325352294__callbacks'
2014-02-23T02:12:14.311698+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/abstract_controller/callbacks.rb:17:in `process_action'
2014-02-23T02:12:14.311520+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/mongoid-3.1.6/lib/mongoid/contextual.rb:21:in `rescue in first'
2014-02-23T02:12:14.311698+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.16/lib/active_support/notifications.rb:123:in `block in instrument'
2014-02-23T02:12:14.311698+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
2014-02-23T02:12:14.311698+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.16/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
2014-02-23T02:12:14.311698+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.16/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
2014-02-23T02:12:14.312217+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/abstract_controller/rendering.rb:45:in `process'
2014-02-23T02:12:14.311698+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.16/lib/active_support/callbacks.rb:81:in `run_callbacks'
2014-02-23T02:12:14.311698+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
2014-02-23T02:12:14.311698+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
2014-02-23T02:12:14.311698+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.16/lib/active_support/notifications.rb:123:in `instrument'
2014-02-23T02:12:14.312217+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
2014-02-23T02:12:14.312217+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
2014-02-23T02:12:14.312217+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
2014-02-23T02:12:14.312217+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_controller/metal.rb:203:in `dispatch'
2014-02-23T02:12:14.312217+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_controller/metal.rb:246:in `block in action'
2014-02-23T02:12:14.312217+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/abstract_controller/base.rb:121:in `process'
2014-02-23T02:12:14.312217+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
2014-02-23T02:12:14.312217+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_dispatch/routing/route_set.rb:73:in `call'
2014-02-23T02:12:14.312393+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_dispatch/routing/route_set.rb:608:in `call'
2014-02-23T02:12:14.312393+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/warden-1.2.3/lib/warden/manager.rb:35:in `block in call'
2014-02-23T02:12:14.312393+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
2014-02-23T02:12:14.312217+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_dispatch/routing/route_set.rb:36:in `call'
2014-02-23T02:12:14.312393+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/warden-1.2.3/lib/warden/manager.rb:34:in `call'
2014-02-23T02:12:14.312393+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/mongoid-3.1.6/lib/rack/mongoid/middleware/identity_map.rb:34:in `block in call'
2014-02-23T02:12:14.312393+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/locomotive_cms-2.4.1/lib/locomotive/middlewares/seo_trailing_slash.rb:16:in `call'
2014-02-23T02:12:14.312393+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/mongoid-3.1.6/lib/mongoid/unit_of_work.rb:39:in `unit_of_work'
2014-02-23T02:12:14.312393+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/warden-1.2.3/lib/warden/manager.rb:34:in `catch'
2014-02-23T02:12:14.312746+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_dispatch/middleware/cookies.rb:341:in `call'
2014-02-23T02:12:14.312746+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
2014-02-23T02:12:14.312393+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/mongoid-3.1.6/lib/rack/mongoid/middleware/identity_map.rb:34:in `call'
2014-02-23T02:12:14.312393+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/locomotive_cms-2.4.1/lib/locomotive/middlewares/inline_editor.rb:10:in `call'
2014-02-23T02:12:14.312746+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_dispatch/middleware/flash.rb:242:in `call'
2014-02-23T02:12:14.312746+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:210:in `context'
2014-02-23T02:12:14.312746+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/dragonfly-0.9.15/lib/dragonfly/cookie_monster.rb:9:in `call'
2014-02-23T02:12:14.312746+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/conditionalget.rb:25:in `call'
2014-02-23T02:12:14.312746+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
2014-02-23T02:12:14.312746+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/etag.rb:23:in `call'
2014-02-23T02:12:14.312746+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_dispatch/middleware/head.rb:14:in `call'
2014-02-23T02:12:14.313298+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3.2.16/lib/rails/rack/logger.rb:16:in `block in call'
2014-02-23T02:12:14.312923+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
2014-02-23T02:12:14.312923+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.16/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
2014-02-23T02:12:14.312746+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:205:in `call'
2014-02-23T02:12:14.312923+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.16/lib/active_support/callbacks.rb:81:in `run_callbacks'
2014-02-23T02:12:14.313298+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.16/lib/active_support/tagged_logging.rb:22:in `tagged'
2014-02-23T02:12:14.312923+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.16/lib/active_support/callbacks.rb:405:in `__run_callback'
2014-02-23T02:12:14.312923+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
2014-02-23T02:12:14.312923+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.16/lib/active_support/callbacks.rb:405:in `_run__3023919651669179927__call__2916391713023742690__callbacks'
2014-02-23T02:12:14.312923+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
2014-02-23T02:12:14.312923+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
2014-02-23T02:12:14.313298+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:in `call'
2014-02-23T02:12:14.313298+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3.2.16/lib/rails/rack/logger.rb:16:in `call'
2014-02-23T02:12:14.313298+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_dispatch/middleware/request_id.rb:22:in `call'
2014-02-23T02:12:14.313298+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.16/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
2014-02-23T02:12:14.312923+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3.2.16/lib/rails/rack/logger.rb:32:in `call_app'
2014-02-23T02:12:14.312923+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
2014-02-23T02:12:14.313480+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/dragonfly-0.9.15/lib/dragonfly/middleware.rb:13:in `call'
2014-02-23T02:12:14.313480+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3.2.16/lib/rails/engine.rb:484:in `call'
2014-02-23T02:12:14.313860+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.6.1/lib/thin/connection.rb:55:in `process'
2014-02-23T02:12:14.314052+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.6.1/lib/thin/runner.rb:200:in `run_command'
2014-02-23T02:12:14.314052+00:00 app[web.1]:
2014-02-23T02:12:14.313298+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.16/lib/action_dispatch/middleware/static.rb:63:in `call'
2014-02-23T02:12:14.313298+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward'
2014-02-23T02:12:14.313480+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/locomotive_cms-2.4.1/lib/locomotive/middlewares/permalink.rb:17:in `call'
2014-02-23T02:12:14.313860+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.6.1/lib/thin/connection.rb:80:in `pre_process'
2014-02-23T02:12:14.313860+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
2014-02-23T02:12:14.313480+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in `call!'
2014-02-23T02:12:14.313860+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.6.1/lib/thin/connection.rb:82:in `block in pre_process'
2014-02-23T02:12:14.313480+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
2014-02-23T02:12:14.313298+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/lock.rb:15:in `call'
2014-02-23T02:12:14.313480+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/locomotive_cms-2.4.1/lib/locomotive/middlewares/cache.rb:20:in `call'
2014-02-23T02:12:14.313860+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.6.1/lib/thin/server.rb:162:in `start'
2014-02-23T02:12:14.313480+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:245:in `fetch'
2014-02-23T02:12:14.313480+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:185:in `lookup'
2014-02-23T02:12:14.313860+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.6.1/lib/thin/connection.rb:41:in `receive_data'
2014-02-23T02:12:14.313860+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
2014-02-23T02:12:14.313298+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/runtime.rb:17:in `call'
2014-02-23T02:12:14.313480+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3.2.16/lib/rails/application.rb:231:in `call'
2014-02-23T02:12:14.313480+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3.2.16/lib/rails/railtie/configurable.rb:30:in `method_missing'
2014-02-23T02:12:14.313860+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.6.1/lib/thin/backends/base.rb:73:in `start'
2014-02-23T02:12:14.314052+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.6.1/lib/thin/runner.rb:156:in `run!'
2014-02-23T02:12:14.314052+00:00 app[web.1]:
2014-02-23T02:12:14.313860+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.6.1/lib/thin/controllers/controller.rb:87:in `start'
2014-02-23T02:12:14.313860+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.6.1/lib/thin/connection.rb:80:in `catch'
2014-02-23T02:12:14.314052+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/bin/thin:23:in `<main>'
2014-02-23T02:12:14.314052+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/bin/thin:23:in `load'
2014-02-23T02:12:14.314052+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.6.1/bin/thin:6:in `<top (required)>'
2014-02-23T02:12:13.056223+00:00 heroku[router]: at=info method=GET path=/ host=danacamilleapp.herokuapp.com request_id=2d206784-0fff-4f81-b58c-96e73fd13722 fwd="72.89.235.136" dyno=web.1 connect=10ms service=15ms status=500 bytes=932
mongoid.yml
development:
sessions:
default:
database: locomotive_dev
hosts:
- localhost:27017
options:
identity_map_enabled: true
test:
sessions:
default:
database: locomotive_test
hosts:
- localhost:27017
options:
identity_map_enabled: true
production:
uri: <%= ENV['MONGOHQ_URL'] %>
sessions:
default:
database: locomotive_production
hosts:
該錯誤意味着什麼是你的代碼錯誤。這真的可以是任何事情。但最有可能是一個不合適的字符,語法錯誤。 – sonnyhe2002