On Wed, May 30, 2012 at 11:26 AM, Doug Jolley <lists / ruby-forum.com> wrote:

> It is my understanding that when a new session instance is created by
> invoking CGI::Session.new, the instance created will be a continuation
> of the existing session if one exists.  Otherwise, the instance created
> will create a new session.  I recently encountered the situation where
> the instance created was always a new session regardless of whether
> there was an existing session.  After doing some Googleing I found that
> I was able to solve the problem by including a 'session_path'=>'/'
> option. After doing some re-arrangement of the code, I find that my
> problem has returned.
>
> I'm thinking that I might be able to again fix the problem by changing
> the path of the option; but, I have no idea what it should be changed
> to.  (BTW. I tried omitting the option entirely; but, that didn't fix
> the problem.)  My efforts to discover what '/' should be changed to are
> frustrated by the fact that I really have no idea what this option does.
> The documentation is not very helpful saying only that the session_path
> is, "the path for which the session applies" and that it defaults to the
> directory of the CGI script.
>
> Can someone help me better understand what this option does so that
> hopefully I will be able to fix this problem?  Naturally any specific
> guidance on fixing the problem directly would also be appreciated.
>
> Thanks for any input.
>


Take a look at the legacy version of tryruby. I used CGI directly and did
not have this issue.
It may help answer your question.

https://github.com/Sophrinix/TryRuby/blob/legacy/non-rack-legacy/public/irb.cgi

Andrew McElroy


>
>       ... doug
>
> --
> Posted via http://www.ruby-forum.com/.
>
>