Having spent the best part of a week debugging the sudden failure of sessions recently, I may be able to help.? The first thing to figure out is if the session is saving state and not loading, or loading but not saving.? In my case the ActiveRecordStore was not serializing the session data, but was loading and saving the session object.? This meant that previously set session values still existed, but any changes did not persist across calls.? I was able to validate that the logins were successful, but suffered similar issues to you.
In the end I tracked the problem down to overriding the ActiveRecord::Base.create_or_update method.? For some reason it completely broke ActiveSessionStore serialization, even if the redefined method contained the exact same code as the original.? I never completely figured out WHY that broke, but if I moved my changes to create and update methods that create_or_update called, I no longer experienced that problem.
My conclusion is that that code experiences some brittleness, most probably related to the filters.? If your code (or any gems/plugins) mess with any ActiveRecord methods, that would be where I'd start looking.
The other thing to think about would be going to SQLstore instead, which would make the session store a lot quicker.
Hope that is at least a little helpful,
On Wed, Aug 26, 2009 at 9:30 AM, Jon Seidel <[address removed]>
Hi... I've got a problem
upgrading from Rails 1.3.6 to 2.3.2 and friends.
I use the session to store
a couple of small but critical pieces of information for my app; I use
ActiveRecordStore for this.