C:\dev\redmine>rake db:test:purge
(in C:/dev/redmine)
rake aborted!
Permission denied - db/test.sqlite3
Boo!
I don't know what made me think of it but I tried unsetting my RAILS_ENV environment variable (I had it set to "test"):
C:\dev\redmine>set rails_env=
C:\dev\redmine>rake db:test:purge
(in C:/dev/redmine)
C:\dev\redmine>
Hurrah!
Problem still exists for me in Ruby 1.8.7. Permission denied when using SQLite 3, but only when the target is test.
ReplyDeleterake db:test:purge may work, but db:test:prepare is not.
@Titus, do you have a console open in the test environment?
ReplyDeletehttp://stackoverflow.com/questions/1234471/rails-rake-testfunctionals-cannot-access-db-sqlite3-on-winxp
unsetting RAILS_ENV worked for me on rake db:test:prepare. Never would have found this without your post -- Thanks
ReplyDeleteHere is another case when apatana locks the db and causes the error. See post: http://www.gyrotechie.com/2009/01/permissions-problem-with-rake-on-xp/
ReplyDeleteyep, this 100% works in windows. Amazing fix/hack. Yet so bad on the part of whoever caused this obscure issue.
ReplyDelete