Is the database locked?

How to fix a database lock ... because my test fails - this leads to the failure of tests in one category. thanks!

1) UsersController GET 'edit' should have a link to change the Gravatar Failure/Error: @user = Factory(:user) SQLite3::BusyException: database is locked: INSERT INTO "users" ("created_at", "email", "encrypted_password", "name", "salt", "updated_at") VALUES ('2011-05-29 03:47:07.510067', ' mberman84@gmail.com ', 'fc70fcb4b094b388d87c5054ed9b0bfa06f53431d44c527e852c5bdffd3a0fa8', 'Matthew Berman', NULL, '2011-05-29 03:47:07.510067') # ./spec/controllers/users_controller_spec.rb:128:in `block (3 levels) in <top (required)>' 
+3
source share
1 answer

This is due to opening a Rails console session. To get around this in the future, be sure to bin/rails console -s and when accessing SQLite 3 DB make sure that you leave all console sessions.

+16
source

All Articles