Question

SQLite3::SQLException: SQL logic error or missing database

error when do insert, update and delete operation to tables from browser( that means the create, update and destroy action is failed but the show action is fine ), the same operation in console is OK. I googled this problem and found most of the solutions is to remove duplication in the fixtures, so I removed all the test data from the fixture and restart the server, and it failed again:(
Any advise is appreciated.

Was it helpful?

Solution

It turned out that I forget use "sudo script/server" to get write permission to the database :)

OTHER TIPS

I don't mean to resurrect the dead, but I just encountered this problem, and the popular answers I found did not apply.

My problem turned out to be the SQLite Manager add-on for Firefox. I used the SysInternals "handle" program to determine that a) Firefox/SQLiteManager had (I assume) an open transaction, and b) every time I used the add-on to connect to the database, it did not destroy the previous one, which was no longer accessible.

I exited Firefox, and my code ran fine. I loaded Firefox and SQLite Manager again, but did not begin a transaction; again, my code ran fine. My code was Python, not RoR.

I would recommend this answer, and the original question be tagged for [sqlite3]. It's definitely not specific to RoR.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow