From: Clifford Heath Date: 2007-10-15T21:40:02+09:00 Subject: Re: SQLite3::SQLException: SQL logic error or missing database Une B�vue wrote: > Clifford Heath wrote: > >> SQLLite doesn't handle multi-threading. I don't see any in your example, >> but it bit me, for example using it with Webrick. Switched to mongrel, >> problem vanished - mongrel only handles one request at a time per process. > > I've tried also surrounding the DB.execute by a DB.transaction without > any effect... The transaction won't help, you get the error from starting a transaction while one is already running. Put a begin... rescue=>e ... end around your db access code, and in the rescue clause, print e.backtrace (it's an array). That'll tell you exactly where the error is being thrown. Go and read the code of the sqlite adapter, and don't be afraid to fill it full of print statements. I personally favour: print "message: "+caller*"\n\t" If you can't *then* see why your code is violating SQLite's non-reentrant requirement, come back and ask again, with code samples. In other words, debug it yourself before asking here again. Nothing strange or magical is happening. There is an error in the code, and we can't find it for you. Clifford Heath.