title: Session cookie issue: undefined method `each_with_object' Upgrading to Rails 4 and Ruby 2
body: <p>We are upgrading from Ruby 1.9.3 to Ruby 2 and from Rails 3.x to Rails4.
  We are using devise for authentication. We upgraded the gems based on Ryan Bates Railscasts.</p>
  
  <p>Now, when I start the server, I see the following error. </p>
  
  <p>Update: This has something to do with session cookies, when I open a window in incognito mode I don't get this error, but I don't want my users to get this error.</p>
  
  <p>I am using rbenv</p>
  
  <pre><code>→ ruby -v
  ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin12.0]
  
  → gem list rack
  
  *** LOCAL GEMS ***
  
  rack (1.5.2)
  rack-test (0.6.2)
  
  
  Processing by HomeController#index as HTML
  Completed 500 Internal Server Error in 4ms
  
  NoMethodError (undefined method `each_with_object' for #&lt;String:0x007fe40519d368&gt;):
    actionpack (4.0.2) lib/action_dispatch/request/session.rb:175:in `stringify_keys'
    actionpack (4.0.2) lib/action_dispatch/request/session.rb:170:in `load!'
    actionpack (4.0.2) lib/action_dispatch/request/session.rb:160:in `load_for_read!'
    actionpack (4.0.2) lib/action_dispatch/request/session.rb:86:in `[]'
    warden (1.2.3) lib/warden/session_serializer.rb:30:in `fetch'
    warden (1.2.3) lib/warden/proxy.rb:212:in `user'
  </code></pre>