This project is archived and is in readonly mode.
Rails crashes unless config.action_controller.session is set
Reported by DavidBackeus | March 4th, 2010 @ 11:40 AM | in 3.0.2
Noted on edge rails at 0de3b9ec93e7221cfe24bd13d57616d8d8d03a57
Replicate (a fresh rails edge app will do):
rails error_app
cd error_app
(edit Gemfile to bundle edge rails from git) bundle install
script/rails console
Long stacktrace:
/Users/druiden/.rvm/gems/ruby-1.9.1-p378%rails3/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/activesupport/lib/active_support/whiny_nil.rb:49:in
method_missing': undefined method
symbolize_keys' for
nil:NilClass (NoMethodError)
from /Users/druiden/.rvm/gems/ruby-1.9.1-p378%rails3/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_dispatch/middleware/session/cookie_store.rb:74:in `initialize'
from /Users/druiden/.rvm/gems/ruby-1.9.1-p378%rails3/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_dispatch/middleware/stack.rb:74:in `new'
from /Users/druiden/.rvm/gems/ruby-1.9.1-p378%rails3/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_dispatch/middleware/stack.rb:74:in `build'
from /Users/druiden/.rvm/gems/ruby-1.9.1-p378%rails3/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_dispatch/middleware/stack.rb:126:in `block in build'
from /Users/druiden/.rvm/gems/ruby-1.9.1-p378%rails3/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_dispatch/middleware/stack.rb:126:in `each'
from /Users/druiden/.rvm/gems/ruby-1.9.1-p378%rails3/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_dispatch/middleware/stack.rb:126:in `inject'
from /Users/druiden/.rvm/gems/ruby-1.9.1-p378%rails3/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/actionpack/lib/action_dispatch/middleware/stack.rb:126:in `build'
from /Users/druiden/.rvm/gems/ruby-1.9.1-p378%rails3/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/lib/rails/application.rb:86:in `app'
from /Users/druiden/.rvm/gems/ruby-1.9.1-p378%rails3/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/lib/rails/application/finisher.rb:31:in `block in <module:Finisher>'
from /Users/druiden/.rvm/gems/ruby-1.9.1-p378%rails3/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/lib/rails/initializable.rb:25:in `instance_exec'
from /Users/druiden/.rvm/gems/ruby-1.9.1-p378%rails3/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/lib/rails/initializable.rb:25:in `run'
from /Users/druiden/.rvm/gems/ruby-1.9.1-p378%rails3/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/druiden/.rvm/gems/ruby-1.9.1-p378%rails3/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/lib/rails/initializable.rb:54:in `each'
from /Users/druiden/.rvm/gems/ruby-1.9.1-p378%rails3/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/druiden/.rvm/gems/ruby-1.9.1-p378%rails3/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/lib/rails/application.rb:67:in `initialize!'
from /Users/druiden/.rvm/gems/ruby-1.9.1-p378%rails3/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/lib/rails/application.rb:41:in `method_missing'
from /Users/druiden/.rvm/gems/ruby-1.9.1-p378%rails3/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/lib/rails/commands/console.rb:26:in `start'
from /Users/druiden/.rvm/gems/ruby-1.9.1-p378%rails3/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/lib/rails/commands/console.rb:8:in `start'
from /Users/druiden/.rvm/gems/ruby-1.9.1-p378%rails3/bundler/gems/rails-16a5e918a06649ffac24fd5873b875daf66212ad-master/railties/lib/rails/commands.rb:34:in `<top (required)>'
from script/rails:9:in `require'
from script/rails:9:in `<main>'
This can be fixed by adding the following to config/application.rb:
config.action_controller.session = {:key => "_myapp_session", :secret => "198aa6a2ec7d631a6478139efbfa00f2"}
I guess if this is now required to be set manually it should be added automatically when generating a new app or have some more obvious error message.
Comments and changes to this ticket
-
Prem Sichanugrist (sikachu) March 4th, 2010 @ 02:53 PM
- Milestone cleared.
- State changed from new to verified
- Assigned user set to Carl Lerche
I can reproduce this problem also. It's some gotcha that user would need to be fixed by hand for old application to be working.
For the new application, I'll provide a patch which removes the template for session_store.rb, and move back to define in application.rb
-
Rizwan Reza March 26th, 2010 @ 09:03 AM
- State changed from verified to resolved
Not applicable now. There is now a session_store.rb generated correctly. Prem, please reopen the ticket if it's still a problem. Thanks.
-
Jeff Kreeftmeijer November 8th, 2010 @ 08:53 AM
- Tag cleared.
- Importance changed from to Low
Automatic cleanup of spam.
-
coach replica handbags April 21st, 2011 @ 05:15 AM
. It's some gotcha that user would need to be fixed by hand for old application to be working.
-
cheap gucci May 3rd, 2011 @ 05:49 PM
I can reproduce this problem also. It's some gotcha that user would need to be fixed by hand for old application to be working.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>