I am unable to run rake test:functionals with SQLite3, it gives me this error :
rake aborted!
Permission denied - db/test.sqlite
(See full trace by running task with --trace)
My setup is on Windows XP. Tests were working a few weeks ago. Rails 2.3.2, Rake 0.8.7, sqlite3-ruby 1.2.5 gems
I am using Netbeans for development, but even when it's close I cannot run the test from a command prompt.
I also checked that no handles to test.sqlite are open (through the sysinternals task manager).
I checked the permissions, they are ok.
I tried to delete the file and recreate it, or copy to another filename without any luck either.
I tried running the command as soon as my computer is booted.
Any help is appreciated.
Thanks
I just had this issue. For me, it was caused by me having my rails console opened in a test environment. Closed my session and it no longer threw the error.
Very, very similar behavior on my part: Windows XP, SQLite3, Rails 2.3.4, Rake 0.8.7, Ruby 1.8.6
rake test
works (but I don't believe it's actually running the unit test)
rake test:units
and
rake test:functionals
both fail with a "Permission denied - db/test.sqlite3" With --trace enabled the specific error occurs at ../rails-2.3.4/lib/task/databases.rake:370 at a line that reads "File.delete(dbfile) if File.exist?(dbfile)
So... long story short... I commented it out.
This is NOT a fix, but it was enough of a hack to get the tests to work for me.
If you're running under Cygwin, try running this on your database files:
chmod 777 <your-files>
Cygwin can become confused about what permissions should be applied.
Yes I know these permissions are ridiculous, but so is Cygwin sometimes...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With