Strange ActiveRecord error popping up

Hello guys, I'm developing a new app in Rails, and every now and then I get an ActiveRecord error, I cannot reproduce exactly what triggers it, hope you can help me, or give me tips on debugging this kind of stuff. This time I got the error reporting page, but normally I would just see the 500.html page, with no info about what went wrong.

This is the error (it's the complete text from the error page):

That’s interesting. I had another thread the other day because in dev mode , if I let the app sit for a while, it takes forever (minutes) to reload. I thought the culprit was Ruby as I looked in Windows Task Manager and saw some high mem use. However , watching it for a few days the memory hogging wasn’t an issue. Generally I don’t lose the db connection but I wonder if my symptoms are connected.

Stuart

Thanks for the link Fred,

The weirdest thing is that I get the same error with Sqlite3, and it doesn't use a client-server mode. In fact, I started getting that error in Sqlite3, that's why I moved to Mysql just to face the same problem.

Any help you can lend me would be great guys.

Here is the error dump when it crashed on Sqlite3 (btw I'm using a windowsBox, and edgeRails):