I am seriving my webapp via WEBrick.
I start a Firefox browser #1. Somewhere along the way it performs:
@session[:key] = 'A'
I start a second Firefox browser #2. Somewhere along the way it performs:
@session[:key] = 'B'
What I notice: the value of key in browser #1 is now B not A. I check under RAILS_ROOT/tmp/session and find a single session file only (where RAILS is using PStore to write the session data)
So whether the browsers are started concurrently, overlapping, or one at a time, the same underlying session is being used. Surely the web system is smart enough to generate different session numbers even if the client browser is on the same IP? Or am I being the idiot?
How in the heck can I generate multiple sessions one per client on WEBrick? Will that technique work under Apache or Mongrel which I intend to serve the production version of the site.
I attempted to look under
http://wiki.rubyonrails.com/rails/pages/HowtoWorkWithSessions
but that and related documentation has been down for a while.
Shane