From: Francis Hwang Date: 2002-05-17T00:00:27+09:00 Subject: Re: Digest Articles 40486-40493 (1/1) (ruby-talk ML) Patrick May wrote: >Francis Hwang wrote in message >news:... >> After struggling with eRuby and CGI::Session for a little while, I >> think I may have discovered something strange with how they are >> interacting. Or maybe I'm making a newbie mistake, I dunno. >> >> Here's the problem: I'm trying to set a session in an .rhtml file, >> and then retrieve it from another .rhtml file. My browser receives >> the session cookie, but the path has been set automatically to >> /cgi-bin/. I'm suspecting that this is because eruby lives in >> /cgi-bin/. >> >> The problem, though, is that when I look for the cookie, my browser >> won't send it. Because the page is an .rhtml that doesn't actually >> live in /cgi-bin/ -- it just lives in the document root. >> >> Has anybody else had to deal with this problem? Is there a simple >> workaround I'm missing? > >This sounds like an odd situation. How are you running eruby? are >you directly creating the cgi, or is this something that your >enviroment is doing for you? I added these lines to httpd.conf: AddType application/x-httpd-eruby .rhtml Action application/x-httpd-eruby /cgi-bin/eruby AddHandler cgi-script .rb Options ExecCGI ... all of which is pretty standard stuff, I'd imagine. Francis --