From c11825a2fc6f5dd0b7bc4033a34789c7d2445970 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Thu, 22 Mar 2018 23:57:40 +0800 Subject: Force Rails to not complain about reloading Same strategy with: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/17810 See: https://stackoverflow.com/a/29710188/1992201 Frankly I don't really understand how this works and I don't really care either. However I tried it and it does the job. To try this, make sure you have pending migrations, and run the server, hit the site. It would tell you that there's pending migrations, and then run migrations, and then hit the site again. Without this patch, Rails would complain that "A copy of ...", with this patch, it works without problems. --- config/application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/application.rb b/config/application.rb index 0ff95e33a9c..13501d4bdb5 100644 --- a/config/application.rb +++ b/config/application.rb @@ -170,7 +170,7 @@ module Gitlab ENV['GIT_TERMINAL_PROMPT'] = '0' # Gitlab Read-only middleware support - config.middleware.insert_after ActionDispatch::Flash, 'Gitlab::Middleware::ReadOnly' + config.middleware.insert_after ActionDispatch::Flash, '::Gitlab::Middleware::ReadOnly' config.generators do |g| g.factory_bot false -- cgit v1.2.1