I am running RoR on my local computer and things have been working just fine until I began getting a strange error. I use WEBrick as the local server. When I start the server, I can work for about ten minutes until I get this error on any page I view:

WARNING: You have a nil object when you probably didn't expect it! Odds are you
want an instance of Array instead.

Look in the callstack to see where you're working with an object that could be nil.
Investigate your methods and make sure the object is what you expect!
: SELECT COUNT(*) FROM products
Then, if I refresh the page I get this error:

Invalid argument: SELECT COUNT(*) FROM products
Everything goes back to normal if I restart WEBrick, but then it all starts over again ten minutes later.

Can anyone tell me whats going on??