数据库已被锁定?

如何修复数据库锁…因为我的测试没有通过 – 它在同一类别中进行了一系列测试失败。 谢谢!

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 ' 

这是因为Rails控制台会话正在打开。 为了解决这个问题,请务必使用bin/rails console -s并在访问SQLite 3 DB时确保退出任何控制台会话。