addressalign-toparrow-leftarrow-leftarrow-right-10x10arrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscontroller-playcredit-cardcrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobe--smallglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1languagelaunch-new-window--smalllight-bulblightning-boltlinklocation-pinlockm-swarmSearchmailmediummessagesminusmobilemoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonprintShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstar-shapestartickettrashtriangle-downtriangle-uptwitteruserwarningyahooyoutube

Sessions & Rails 2.3.2...

From: Jon S.
Sent on: Wednesday, August 26, 2009, 9:30 AM
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.
 
Everything is working fine when I run the app in development mode; however, when I test it in production mode (either on my development box or actually deploying it to my site), it fails. What happens is that I logon using a known good id/password, the input is accepted, and then I am immediately returned to the login screen. The message I get is that my before_filter :login_required failed.  When I debug it, I see that there's nothing in the session. (I know that some version of Rails 2.x implemented lazy-loading of sessions and that this is the case in 2.3.2).  It also appears that there's nothing in the params array as well?  I have tried referencing the session as soon as I enter my login method, but that hasn't helped.
 
A few possibilities come to mind; I'm sure there are others...
 
1. Was there also a change that affects CGI parameters? I saw in the release notes that some of the CGI functionality was moved to ActionController but I can't tell if that's an issue for my app.
2. I've been told by my hosting support that there were some session fixes in 2.3.3 to cleanup some 2.3.2 problems, but I don't want to just jump to another release without understanding what's going on.
3. Is there any way to just globally tell Rails: don't lazy-load sessions throughout the app? I checked the APIs and couldn't see anyway to do this.
 
What really baffles me is that it works in development and not in production mode... I've reviewed environment.rb and compared environments/production.rb to environments/development.rb and can't see what could be causing this.
 
Thanks for any help...jon
 

Jon Seidel, CMC®

EDP Consulting, Inc. / www.edpci.com / www.4mypasswords.com

Technology that means Business - Since 1979

3373 Guido Street

Oakland, CA 94602

phone: [masked]

fax: [masked]

 

The Certified Management Consultant (CMC) mark is awarded to consultants who meet the strict standards defined by the Institute of Management Consultants USA, including examination by their peers, client evaluations, and a written examination evidencing their understanding of the IMC USA's Code of Ethics.

Check out IMC USA for more information.

 

People in this
group are also in: