CGI::Session with MySQL?

I would like to implement a session database for my web application
using MySQL. I did this with Perl, and it was real simple, but upon
doing a cursory search on Google and RAA, I can’t seem to find a Ruby
module which already does this.

Do I just need to look harder, or do I need to write it?

Samuel Tesla wrote:

I would like to implement a session database for my web application
using MySQL. I did this with Perl, and it was real simple, but upon
doing a cursory search on Google and RAA, I can’t seem to find a Ruby
module which already does this.

Do I just need to look harder, or do I need to write it?

I don’t know if one exists for MySQL, but there’s definitely one for
Postgres. If nothing else, you could use this code as a model for your
own. I’m sure it wouldn’t be too hard to adapt:

http://raa.ruby-lang.org/list.rhtml?name=cgi-sess-pg

Chad

Chad Fowler chadfowler@chadfowler.com writes:

I don’t know if one exists for MySQL, but there’s definitely one for
Postgres. If nothing else, you could use this code as a model for your
own. I’m sure it wouldn’t be too hard to adapt:

http://raa.ruby-lang.org/list.rhtml?name=cgi-sess-pg

Yeah, that was my plan. I just wanted to see if I needed to even do
that much work. I try to be as lazy as I can. I’ll poke around a
little more, but I suspect I’ll be reading the postgres code and
writing mine (woohoo! more software to write!).