This project is archived and is in readonly mode.
Rails 2.3 does not obey config.action_controller.session_store
-
josh
- Milestone cleared.
- State changed from new to open
-
Repository
- State changed from open to resolved
(from [9702636a08e50e9fed9bf76ad620a6a0a109009e]) Lazy evaluate ActionController session store middleware class to pickup custom plugin session stores [#2001 Rails 2.3 does not obey config.action_controller.session_store state:resolved] http://github.com/rails/rails/co...
-
Thibaud Guillaume-Gentil
I can't launch script/server anymore in a default rails app with edge
/Users/Thibaud/Desktop/test2/vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb:163:in `ensure_session_key': A key is required to write a cookie containing the session data. Use config.action_controller.session = { :key => "_myapp_session", :secret => "some secret phrase" } in config/environment.rb (ArgumentError) from /Users/Thibaud/Desktop/test2/vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb:74:in `initialize' from /Users/Thibaud/Desktop/test2/vendor/rails/actionpack/lib/action_controller/middleware_stack.rb:72:in `new' from /Users/Thibaud/Desktop/test2/vendor/rails/actionpack/lib/action_controller/middleware_stack.rb:72:in `build' from /Users/Thibaud/Desktop/test2/vendor/rails/actionpack/lib/action_controller/middleware_stack.rb:110:in `build' from /Users/Thibaud/Desktop/test2/vendor/rails/activesupport/lib/active_support/inflector.rb:359:in `inject' from /Users/Thibaud/Desktop/test2/vendor/rails/actionpack/lib/action_controller/middleware_stack.rb:110:in `each' from /Users/Thibaud/Desktop/test2/vendor/rails/actionpack/lib/action_controller/middleware_stack.rb:110:in `inject' from /Users/Thibaud/Desktop/test2/vendor/rails/actionpack/lib/action_controller/middleware_stack.rb:110:in `build' ... 12 levels... from /Users/Thibaud/Desktop/test2/vendor/rails/railties/lib/commands/server.rb:84 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require' from ./script/server:3 -
Eloy Duran
Same problem as Thibaud overhere.
I haven't had the time to investigate, no time so had to revert, but at least it seems there wasn't and isn't enough test coverage for this area, because the tests still run fine.
-
Flurin
We've encountered the same problem here. Josh tried to fix the problem by letting the MiddlewareStack decide wether or not to load the SessionStore based on wether or not it's available.
It seems however that because of a default SessionStore (CookieStore) it tries to load that but it hasn't any options set yet. (Because the middlewarestack is initialized before any rails initializers are run).
-
josh
- State changed from resolved to open
-
Sven Fuchs
- State changed from open to resolved
I've created a new ticket for this and added a patch: #2028 CookieStore does not get passed config settings
-
josh
- State changed from resolved to open
-
josh
- State changed from open to resolved