Defect #26636
Updated by Go MAEDA over 7 years ago
**Steps to reproduce:** 1. Create a test plugin. <pre> bin/rails g redmine_plugin foo bin/rails g redmine_plugin_controller foo foo index echo 'get "foo", :to => "foo#index"' >> plugins/foo/config/routes.rb </pre> 2. Run Redmine in production mode <pre> bin/rails bbin/rails s -e production </pre> 3. Open http://localhost/foo and you will see "Page not found" error. No problem in development mode. **production.log:** {{collapse <pre> Started GET "/foo" for 127.0.0.1 at 2017-08-06 13:19:10 +0900 ActionController::RoutingError (uninitialized constant FooController): activesupport (5.1.2) lib/active_support/inflector/methods.rb:269:in `const_get' activesupport (5.1.2) lib/active_support/inflector/methods.rb:269:in `block in constantize' activesupport (5.1.2) lib/active_support/inflector/methods.rb:267:in `each' activesupport (5.1.2) lib/active_support/inflector/methods.rb:267:in `inject' activesupport (5.1.2) lib/active_support/inflector/methods.rb:267:in `constantize' activesupport (5.1.2) lib/active_support/dependencies.rb:582:in `get' activesupport (5.1.2) lib/active_support/dependencies.rb:613:in `constantize' actionpack (5.1.2) lib/action_dispatch/http/request.rb:82:in `controller_class' actionpack (5.1.2) lib/action_dispatch/routing/route_set.rb:43:in `controller' actionpack (5.1.2) lib/action_dispatch/routing/route_set.rb:29:in `serve' actionpack (5.1.2) lib/action_dispatch/journey/router.rb:46:in `block in serve' actionpack (5.1.2) lib/action_dispatch/journey/router.rb:33:in `each' actionpack (5.1.2) lib/action_dispatch/journey/router.rb:33:in `serve' actionpack (5.1.2) lib/action_dispatch/routing/route_set.rb:832:in `call' rack-openid (1.4.2) lib/rack/openid.rb:98:in `call' request_store (1.0.5) lib/request_store/middleware.rb:9:in `call' rack (2.0.3) lib/rack/etag.rb:25:in `call' rack (2.0.3) lib/rack/conditional_get.rb:25:in `call' rack (2.0.3) lib/rack/head.rb:12:in `call' rack (2.0.3) lib/rack/session/abstract/id.rb:232:in `context' rack (2.0.3) lib/rack/session/abstract/id.rb:226:in `call' actionpack (5.1.2) lib/action_dispatch/middleware/cookies.rb:613:in `call' actionpack (5.1.2) lib/action_dispatch/middleware/callbacks.rb:26:in `block in call' activesupport (5.1.2) lib/active_support/callbacks.rb:97:in `run_callbacks' actionpack (5.1.2) lib/action_dispatch/middleware/callbacks.rb:24:in `call' actionpack (5.1.2) lib/action_dispatch/middleware/debug_exceptions.rb:59:in `call' actionpack (5.1.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' railties (5.1.2) lib/rails/rack/logger.rb:36:in `call_app' railties (5.1.2) lib/rails/rack/logger.rb:24:in `block in call' activesupport (5.1.2) lib/active_support/tagged_logging.rb:69:in `block in tagged' activesupport (5.1.2) lib/active_support/tagged_logging.rb:26:in `tagged' activesupport (5.1.2) lib/active_support/tagged_logging.rb:69:in `tagged' railties (5.1.2) lib/rails/rack/logger.rb:24:in `call' actionpack (5.1.2) lib/action_dispatch/middleware/remote_ip.rb:79:in `call' actionpack (5.1.2) lib/action_dispatch/middleware/request_id.rb:25:in `call' rack (2.0.3) lib/rack/method_override.rb:22:in `call' rack (2.0.3) lib/rack/runtime.rb:22:in `call' activesupport (5.1.2) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call' actionpack (5.1.2) lib/action_dispatch/middleware/executor.rb:12:in `call' actionpack (5.1.2) lib/action_dispatch/middleware/static.rb:125:in `call' rack (2.0.3) lib/rack/content_length.rb:15:in `call' rack (2.0.3) lib/rack/sendfile.rb:111:in `call' railties (5.1.2) lib/rails/engine.rb:522:in `call' puma (3.9.1) lib/puma/configuration.rb:224:in `call' puma (3.9.1) lib/puma/server.rb:602:in `handle_request' puma (3.9.1) lib/puma/server.rb:435:in `process_client' puma (3.9.1) lib/puma/server.rb:299:in `block in run' puma (3.9.1) lib/puma/thread_pool.rb:120:in `block in spawn_thread' </pre> }}