I get the following error when I run rake db:drop
or rake db:reset
I have tried everything I can find on the internet including restarting the server, restarting my computer, deleting the development.sqlite3 and schema.rb and rerunning migrate. Any help would be appreciated. I am new on ROR. Thanks in advance. I am using Rails 5.1.3 and Ruby 2.4.1.
** Invoke db:drop (first_time)
** Invoke db:load_config (first_time)
** Execute db:load_config
** Invoke db:check_protected_environments (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config
** Execute db:check_protected_environments
** Execute db:drop
** Invoke db:drop:_unsafe (first_time)
** Invoke db:load_config
** Execute db:drop:_unsafe
Permission denied @ unlink_internal - C:/Users/hash/Desktop/Rails_Blog/blog/db/development.sqlite3
Couldn't drop database 'db/development.sqlite3'
rake aborted!
Errno::EACCES: Permission denied @ unlink_internal - C:/Users/hash/Desktop/Rails_Blog/blog/db/development.sqlite3
C:/Ruby24-x64/lib/ruby/2.4.0/fileutils.rb:1340:in `unlink'
C:/Ruby24-x64/lib/ruby/2.4.0/fileutils.rb:1340:in `block in remove_file'
C:/Ruby24-x64/lib/ruby/2.4.0/fileutils.rb:1348:in `platform_support'
C:/Ruby24-x64/lib/ruby/2.4.0/fileutils.rb:1339:in `remove_file'
C:/Ruby24-x64/lib/ruby/2.4.0/fileutils.rb:703:in `remove_file'
C:/Ruby24-x64/lib/ruby/2.4.0/fileutils.rb:506:in `block in rm'
C:/Ruby24-x64/lib/ruby/2.4.0/fileutils.rb:505:in `each'
C:/Ruby24-x64/lib/ruby/2.4.0/fileutils.rb:505:in `rm'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activerecord-5.1.3/lib/active_record/tasks/sqlite_database_tasks.rb:22:in `drop'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activerecord-5.1.3/lib/active_record/tasks/database_tasks.rb:144:in `drop'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activerecord-5.1.3/lib/active_record/tasks/database_tasks.rb:160:in `block in drop_current'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activerecord-5.1.3/lib/active_record/tasks/database_tasks.rb:304:in `block in each_current_configuration'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activerecord-5.1.3/lib/active_record/tasks/database_tasks.rb:303:in `each'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activerecord-5.1.3/lib/active_record/tasks/database_tasks.rb:303:in `each_current_configuration'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activerecord-5.1.3/lib/active_record/tasks/database_tasks.rb:159:in `drop_current'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activerecord-5.1.3/lib/active_record/railties/databases.rake:42:in `block (2 levels) in <top (required)>'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `block in execute'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `each'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `execute'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:194:in `block in invoke_with_call_chain'
C:/Ruby24-x64/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:187:in `invoke_with_call_chain'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:180:in `invoke'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/activerecord-5.1.3/lib/active_record/railties/databases.rake:38:in `block (2 levels) in <top (required)>'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `block in execute'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `each'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `execute'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:194:in `block in invoke_with_call_chain'
C:/Ruby24-x64/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:187:in `invoke_with_call_chain'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:180:in `invoke'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:152:in `invoke_task'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `block (2 levels) in top_level'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `each'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `block in top_level'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:117:in `run_with_threads'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:102:in `top_level'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:80:in `block in run'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:77:in `run'
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
C:/Ruby24-x64/bin/rake:22:in `load'
C:/Ruby24-x64/bin/rake:22:in `<main>'
Tasks: TOP => db:drop:_unsafe
Aucun commentaire:
Enregistrer un commentaire