From 784b9f4aca932e922d356dd858b91795e93f80c2 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 8 Apr 2018 13:45:27 +0000 Subject: [PATCH] Rails 5: "Page not found" error when accessing a page of a plugin in production mode (#26636). Patch by Akiko Takano. git-svn-id: http://svn.redmine.org/redmine/trunk@17293 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/plugin.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/redmine/plugin.rb b/lib/redmine/plugin.rb index 7f058a31d..ad42980e1 100644 --- a/lib/redmine/plugin.rb +++ b/lib/redmine/plugin.rb @@ -93,6 +93,7 @@ module Redmine #:nodoc: # Adds the app/{controllers,helpers,models} directories of the plugin to the autoload path Dir.glob File.expand_path(File.join(p.directory, 'app', '{controllers,helpers,models}')) do |dir| ActiveSupport::Dependencies.autoload_paths += [dir] + Rails.application.config.eager_load_paths += [dir] if Rails.env == 'production' end # Defines plugin setting if present