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

后端 未结 2 526
傲寒
傲寒 2020-12-16 05:53

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\\proj         


        
相关标签:
2条回答
  • 2020-12-16 06:05

    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.

    0 讨论(0)
  • 2020-12-16 06:25

    I had the same problem with my test.sqlite3 table and what worked for me was making a copy of my development.sqlite3 table and renaming it test.sqlite3. I hope this works for you.

    0 讨论(0)
提交回复
热议问题