Errno::EACCES: Permission denied @ unlink_internal when running rake test:models

rake, ruby-on-rails

Solution

One way I was able to get around this error was using

rake db:migrate rails_env=test

This generated the necessary migrations on my test.sqlite3

I believe the default setting for rails_env is "dev" but this may vary. I am still very new to rails but I hope this helps.

Problem

I'm playing with rails 4. I just created very simple test for my model but when I try to execute "rake test:models" I get following error: ``` C:\rails\project>rake test:models DL is deprecated, please use Fiddle rake aborted! Errno::EACCES: Permission denied @ unlink_internal - /tmp/db/new.sqlite3 C:/rails/project/test/test_helper.rb:3:in `<top (required)>' C:/rails/project/test/models/admin_test.rb:1:in `<top (required)>' Tasks: TOP => test:models (See full trace by running task with --trace) ``` My test database configuration looks as follows: ``` test: adapter: sqlite3 database: /tmp/db/new.sqlite3 pool: 5 timeout: 5000 ``` "/tmp/db" is directory where I have full access on my personal laptop. Any ideas what could be source of this problem?

Original source