diff --git a/config/initializers/10-patches.rb b/config/initializers/10-patches.rb index ea11311ba..d739e6ce0 100644 --- a/config/initializers/10-patches.rb +++ b/config/initializers/10-patches.rb @@ -88,3 +88,16 @@ module ActionController end end end + +module ActionController + class Base + # Displays an explicit message instead of a NoMethodError exception + # when trying to start Redmine with an old session_store.rb + # TODO: remove it in a later version + def self.session=(*args) + $stderr.puts "Please remove config/session_store.rb and run `rake generate_secret_token`.\n" + + "Setting the session secret with ActionController.session= is no longer supported in Rails 3." + exit 1 + end + end +end