I think that perhaps what Craig was suggesting was that you replace
@session with session. As I understand it, use of the @ is being
deprecated to make local vs. instance vs. (what the heck is the right
word to use for the type for session and params?). I was told this WRT
@params, and I’d bet it’s true for @session too.
----- Original Message -----
From: Adam D.
Sent: 2006-04-08 9:13 AM
Subject: Re: [Rails] Re: session error in rails 1.1
this is starting to feel very buggy. This time all I did was change
one line of an rhtml file, reload the browser and I got the error.
Maybe because I load my model into the session like
@entry = User.find(3)
@session[:user] = @entry
when a user first logs in Its causing some funky behavior in rails ?
I dont think adding a few lines of html to an rhtml file would make this
popup b/c thats what happened this time.
On 4/5/06, Craig W. email@example.com wrote:
On Wed, 2006-04-05 at 17:15 -0700, Christopher Burnley wrote:
> I’m not sure if this is correct or will help, but I ran into a
> problem after the 1.1 on my production server (FreeBSD 6.0,
> fast_cgi) where I would get an “application error”. It took me a
> while to figure out that the objects I was storing in the session
> objects were coming back nil when accessed within a view. I did
> usual job of deleting the RUBY.Session objects in the temp
> bounced the web server and the problem was still there. I started
> think maybe there was an issue of scope with respect to the
> In my code I had previously stored things in the session by
> session[:xyz]= “blah”
> and everything worked, then I upgraded to 1.1 and started getting
> errors. I went in and refactored all the session[:xyz] references
> @session[:xyz]= “blah”
> bounced the server and everything worked like a charm. The strange
> thing was that this only affected production. I could load the
> console or webrick and everything behaved as expected which is why
> am not certain if the problem somehow magically got fixed between
> server bounces but it is worth trying if you are having the same
FWIW, I use session[:key] = “value” (probably too frequently) and
migration to rails 1.1 had no impact on me and I have refactored
Rails mailing list
Rails mailing list