ruby on rails - bundle exec rake test:models throws Errno::EACCES: Permission denied -


i doing draft version of railstutorial, when try run bundle exec rake test:models error message:

rake aborted! errno::eacces: permission denied - c:/users/alex/desktop/workspace/rails/sample_ app/db/test.sqlite3 c:/users/alex/desktop/workspace/rails/sample_app/test/test_helper.rb:3:in `<top (required)>' c:/users/alex/desktop/workspace/rails/sample_app/test/helpers/application_helper _test.rb:1:in `<top (required)>' tasks: top => test:run => test:units (see full trace running task --trace) 

with --trace:

** invoke test (first_time) ** execute test ** invoke test:run (first_time) ** invoke test:units (first_time) ** invoke test:prepare (first_time) ** execute test:prepare ** execute test:units rake aborted! errno::eacces: permission denied - c:/users/alex/desktop/workspace/rails/sample_ app/db/test.sqlite3 c:/railsinstaller/ruby2.0.0/lib/ruby/2.0.0/fileutils.rb:1432:in `unlink' c:/railsinstaller/ruby2.0.0/lib/ruby/2.0.0/fileutils.rb:1432:in `block in remove _file' c:/railsinstaller/ruby2.0.0/lib/ruby/2.0.0/fileutils.rb:1440:in `platform_suppor t' c:/railsinstaller/ruby2.0.0/lib/ruby/2.0.0/fileutils.rb:1431:in `remove_file' c:/railsinstaller/ruby2.0.0/lib/ruby/2.0.0/fileutils.rb:785:in `remove_file' c:/railsinstaller/ruby2.0.0/lib/ruby/2.0.0/fileutils.rb:563:in `block in rm' c:/railsinstaller/ruby2.0.0/lib/ruby/2.0.0/fileutils.rb:562:in `each' c:/railsinstaller/ruby2.0.0/lib/ruby/2.0.0/fileutils.rb:562:in `rm' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta1/li b/active_record/tasks/sqlite_database_tasks.rb:22:in `drop' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta1/li b/active_record/tasks/sqlite_database_tasks.rb:26:in `purge' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta1/li b/active_record/tasks/database_tasks.rb:159:in `purge' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta1/li b/active_record/tasks/database_tasks.rb:201:in `load_schema_for' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta1/li b/active_record/tasks/database_tasks.rb:216:in `block in load_schema_current' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta1/li b/active_record/tasks/database_tasks.rb:255:in `block in each_current_configurat ion' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta1/li b/active_record/tasks/database_tasks.rb:254:in `each' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta1/li b/active_record/tasks/database_tasks.rb:254:in `each_current_configuration' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta1/li b/active_record/tasks/database_tasks.rb:215:in `load_schema_current' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta1/li b/active_record/migration.rb:402:in `load_schema_if_pending!' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta1/li b/active_record/migration.rb:409:in `block in maintain_test_schema!' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta1/li b/active_record/migration.rb:637:in `suppress_messages' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta1/li b/active_record/migration.rb:414:in `method_missing' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/activerecord-4.2.0.beta1/li b/active_record/migration.rb:409:in `maintain_test_schema!' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.2.0.beta1/lib/ra ils/test_help.rb:19:in `<top (required)>' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.2.0.beta1/l ib/active_support/dependencies.rb:248:in `require' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.2.0.beta1/l ib/active_support/dependencies.rb:248:in `block in require' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.2.0.beta1/l ib/active_support/dependencies.rb:233:in `load_dependency' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.2.0.beta1/l ib/active_support/dependencies.rb:248:in `require' c:/users/alex/desktop/workspace/rails/sample_app/test/test_helper.rb:3:in `<top (required)>' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.2.0.beta1/l ib/active_support/dependencies.rb:248:in `require' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.2.0.beta1/l ib/active_support/dependencies.rb:248:in `block in require' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.2.0.beta1/l ib/active_support/dependencies.rb:233:in `load_dependency' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.2.0.beta1/l ib/active_support/dependencies.rb:248:in `require' c:/users/alex/desktop/workspace/rails/sample_app/test/helpers/application_helper _test.rb:1:in `<top (required)>' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.2.0.beta1/l ib/active_support/dependencies.rb:248:in `require' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.2.0.beta1/l ib/active_support/dependencies.rb:248:in `block in require' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.2.0.beta1/l ib/active_support/dependencies.rb:233:in `load_dependency' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/activesupport-4.2.0.beta1/l ib/active_support/dependencies.rb:248:in `require' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.2.0.beta1/lib/ra ils/test_unit/sub_test_task.rb:114:in `block (3 levels) in define' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.2.0.beta1/lib/ra ils/test_unit/sub_test_task.rb:114:in `each' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.2.0.beta1/lib/ra ils/test_unit/sub_test_task.rb:114:in `block (2 levels) in define' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.2.0.beta1/lib/ra ils/test_unit/sub_test_task.rb:113:in `each' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.2.0.beta1/lib/ra ils/test_unit/sub_test_task.rb:113:in `block in define' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.r b:240:in `call' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.r b:240:in `block in execute' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.r b:235:in `each' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.r b:235:in `execute' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.r b:179:in `block in invoke_with_call_chain' c:/railsinstaller/ruby2.0.0/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.r b:172:in `invoke_with_call_chain' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.r b:201:in `block in invoke_prerequisites' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.r b:199:in `each' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.r b:199:in `invoke_prerequisites' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.r b:178:in `block in invoke_with_call_chain' c:/railsinstaller/ruby2.0.0/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.r b:172:in `invoke_with_call_chain' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.r b:165:in `invoke' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.2.0.beta1/lib/ra ils/test_unit/sub_test_task.rb:20:in `invoke_rake_task' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.2.0.beta1/lib/ra ils/test_unit/testing.rake:8:in `block in <top (required)>' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.r b:240:in `call' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.r b:240:in `block in execute' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.r b:235:in `each' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.r b:235:in `execute' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.r b:179:in `block in invoke_with_call_chain' c:/railsinstaller/ruby2.0.0/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.r b:172:in `invoke_with_call_chain' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/task.r b:165:in `invoke' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/applic ation.rb:150:in `invoke_task' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/applic ation.rb:106:in `block (2 levels) in top_level' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/applic ation.rb:106:in `each' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/applic ation.rb:106:in `block in top_level' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/applic ation.rb:115:in `run_with_threads' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/applic ation.rb:100:in `top_level' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/applic ation.rb:78:in `block in run' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/applic ation.rb:176:in `standard_exception_handling' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.3.2/lib/rake/applic ation.rb:75:in `run' c:/railsinstaller/ruby2.0.0/lib/ruby/gems/2.0.0/gems/rake-10.3.2/bin/rake:33:in `<top (required)>' c:/railsinstaller/ruby2.0.0/bin/rake:23:in `load' c:/railsinstaller/ruby2.0.0/bin/rake:23:in `<main>' tasks: top => test:run => test:units 

i have tried checking permissions on db folder, , tried restart everything. using rails version 4.2.0beta1 on windows. problem started when made "user" model. tried rolling , migrating again well.

edit: seems test database corrupted in way. if change /config/database.yml test: /db/development.sqlite tests work.

i deleted old test.sqlite3 , replaced copy of development.sqlite3 , renamed test.sqlite3, seems have solved problem.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -