SQLite3 Exception: SQL logic error or missing database

So this morning I was trying to update a testing machine with my shiny new Rails app.

  • Remove the sqlite database – CHECK
  • run rake db:migrate – CHECK
  • start the application

Now there were no errors anywhere. But I still get:

SQLite3::SQLException: SQL logic error or missing database

After usual googling around and trying to fix it I just saw what the problem with the Query is. The reason for the exception is putting a ‘NULL’ into non NULL column. And SQLite says “missing database”. Way to write the exceptions.

Note to Self: Always write meaningful or at least non-misleading exception messages.

3 thoughts on “SQLite3 Exception: SQL logic error or missing database”

  1. if your problem is related to android..ie if you are losing database created on sdcardĀ  everytime you start emulator …then please dont select wipe user data while starting the emulator

Leave a Reply