From 52986e8cd1bba6ad1c4e3e78fe5f1d8d3eb5d44f Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 28 Apr 2012 11:48:34 +0000 Subject: [PATCH] Displays an explicit message when trying to start Redmine with an old session_store.rb. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9566 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- config/initializers/10-patches.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 -- 2.39.5