SQlite3::SQLException: SQL logic error or missing database
SQlite3 errors messages are not very clear ...
"SQlite3::SQLException: SQL logic error or missing database" when inserting should be translated by:
"Invalid id, there is alreay a record in the table with the same id"
In general, we waste a lot of time because libraries authors focus on the "successfull" cases and can't think of all the cases where things can go wrong ...
To play on the safe side, we could try to adopt a defensive programming style and start to write tests (specs) of things which can can fail ...