我的网站已经运行了很长时间了:
然而,今天早上我注意到,有时当我尝试访问所述网站时,我收到 500 错误,然后当我刷新它时,它会提供主页。
所以我从“preload_app:true”恢复了我的独角兽配置,看看是否解决了这个问题
但是,自从重新部署应用程序后,我的日志中出现以下错误,并且应用程序拒绝加载:
ActionController::RoutingError (uninitialized constant CategoriesController):
activesupport (3.2.6) lib/active_support/inflector/methods.rb:229:in `block in constantize'
activesupport (3.2.6) lib/active_support/inflector/methods.rb:228:in `each'
activesupport (3.2.6) lib/active_support/inflector/methods.rb:228:in `constantize'
actionpack (3.2.6) lib/action_dispatch/routing/route_set.rb:69:in `controller_reference'
actionpack (3.2.6) lib/action_dispatch/routing/route_set.rb:54:in `controller'
actionpack (3.2.6) lib/action_dispatch/routing/route_set.rb:32:in `call'
journey (1.0.4) lib/journey/router.rb:68:in `block in call'
journey (1.0.4) lib/journey/router.rb:56:in `each'
journey (1.0.4) lib/journey/router.rb:56:in `call'
actionpack (3.2.6) lib/action_dispatch/routing/route_set.rb:600:in `call'
newrelic_rpm (3.5.2.17) lib/new_relic/rack/error_collector.rb:8:in `call'
newrelic_rpm (3.5.2.17) lib/new_relic/rack/browser_monitoring.rb:12:in `call'
actionpack (3.2.6) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
rack (1.4.1) lib/rack/etag.rb:23:in `call'
rack (1.4.1) lib/rack/conditionalget.rb:25:in `call'
actionpack (3.2.6) lib/action_dispatch/middleware/head.rb:14:in `call'
actionpack (3.2.6) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
actionpack (3.2.6) lib/action_dispatch/middleware/flash.rb:242:in `call'
rack (1.4.1) lib/rack/session/abstract/id.rb:205:in `context'
rack (1.4.1) lib/rack/session/abstract/id.rb:200:in `call'
actionpack (3.2.6) lib/action_dispatch/middleware/cookies.rb:338:in `call'
activerecord (3.2.6) lib/active_record/query_cache.rb:64:in `call'
activerecord (3.2.6) lib/active_record/connection_adapters/abstract/connection_pool.rb:473:in `call'
actionpack (3.2.6) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
activesupport (3.2.6) lib/active_support/callbacks.rb:405:in `_run__683269349__call__722494165__callbacks'
activesupport (3.2.6) lib/active_support/callbacks.rb:405:in `__run_callback'
activesupport (3.2.6) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
activesupport (3.2.6) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (3.2.6) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (3.2.6) lib/action_dispatch/middleware/reloader.rb:65:in `call'
actionpack (3.2.6) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
actionpack (3.2.6) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
actionpack (3.2.6) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
railties (3.2.6) lib/rails/rack/logger.rb:26:in `call_app'
railties (3.2.6) lib/rails/rack/logger.rb:16:in `call'
actionpack (3.2.6) lib/action_dispatch/middleware/request_id.rb:22:in `call'
rack (1.4.1) lib/rack/methodoverride.rb:21:in `call'
rack (1.4.1) lib/rack/runtime.rb:17:in `call'
activesupport (3.2.6) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.4.1) lib/rack/lock.rb:15:in `call'
airbrake (3.1.6) lib/airbrake/rack.rb:41:in `call'
airbrake (3.1.6) lib/airbrake/user_informer.rb:12:in `call'
railties (3.2.6) lib/rails/engine.rb:479:in `call'
railties (3.2.6) lib/rails/application.rb:220:in `call'
railties (3.2.6) lib/rails/railtie/configurable.rb:30:in `method_missing'
unicorn (4.2.1) lib/unicorn/http_server.rb:530:in `process_client'
unicorn (4.2.1) lib/unicorn/http_server.rb:604:in `worker_loop'
newrelic_rpm (3.5.2.17) lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb:18:in `call'
newrelic_rpm (3.5.2.17) lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb:18:in `block (4 levels) in <top (required)>'
unicorn (4.2.1) lib/unicorn/http_server.rb:487:in `spawn_missing_workers'
unicorn (4.2.1) lib/unicorn/http_server.rb:498:in `maintain_worker_count'
unicorn (4.2.1) lib/unicorn/http_server.rb:272:in `join'
unicorn (4.2.1) bin/unicorn:121:in `<top (required)>'
/home/deployer/apps/stealthygecko/shared/bundle/ruby/1.9.1/bin/unicorn:23:in `load'
/home/deployer/apps/stealthygecko/shared/bundle/ruby/1.9.1/bin/unicorn:23:in `<main>'
当我尝试访问任何其他页面甚至网站的管理部分时,我得到了同样的错误(显然是控制器名称发生了变化),我现在花了好几个小时看这个,老实说我看不到问题.
我尝试在本地机器上运行该应用程序,它运行良好。
谁能指出我正确的方向?
提前致谢