Text file busy - db/test.sqlite3

Sometimes things are just too obvious…

When trying to setup the test database for my new rails app I kept getting stuck with this error message:

<b>$ rake db:test:prepare</b>

rake aborted!  
Text file busy - db/test.sqlite3

Tasks: TOP => db:test:load => db:test:purge  
(See full trace by running task with --trace)

Turns out the file was in use… If you have guard running in the background, that needs to be closed down while you run the rake test db commands.