Ran into this error message whilst developing tonight: SQLite3::BusyException: database is locked:
I have two models:
It is most likely not related to rails code. Using at the same time the console with the sandbox option (rails console --sandbox), makes the problem systematic with SQLite, since the console is basically waiting to quit to rollback everything.
The solution above from @trisweb will not work in this case, but quitting the console will.