Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 623 Vote(s) - 3.42 Average
  • 1
  • 2
  • 3
  • 4
  • 5
$ bundle exec rake db:reset command raising couldn't drop db/development.sqlite3

#1
I tried to run `$ bundle exec rake db:reset` and found the following on console

Couldn't drop db/development.sqlite3 : #<Errno::EACCES: Permission denied - c:/sample_app/db/development.sqlite3>
db/development.sqlite3 already exists
-- create_table("users", {:force=>true})
-> 0.3940s
-- add_index("users", ["email"], {:name=>"index_users_on_email", :unique=>true})

-> 0.1280s
-- initialize_schema_migrations_table()
-> 0.0010s
-- assume_migrated_upto_version(20120419034627, ["c:/sample_app/db/migrate
"])
-> 0.0040s

How can I solve it?

**Edit** I was following a tutorial and it tells me to run the above command to delete all the data from the database safely. And I am also using admin account.
Reply

#2
For Dropping entire database just give rake db:setup it drops and again creates the database for you
Reply

#3
Another possible answer is that you have a database file open. Close those files and stop your server, and it should work.
Reply

#4
Have been trying to resolve the same issue. Stopping Rails Server on Windows didn't help, but restarting the whole environment did the trick, bundle exec rake db:reset went through, but be sure not to start your server before that as it will call the same error.
Continue with

$ bundle exec rake db:reset
$ bundle exec rake db:populate
$ bundle exec rake test:prepare

and start Rails Server after that.
Reply

#5
When you do [`db:reset`][1], it's running `db:drop` and `db:setup` in sequence. Your [error message][2] indicates that `db/development.sqlite` couldn't be deleted.

If you're on Windows, maybe you need to stop your Rails server and console. Otherwise, figure out what's preventing the file from being deleted. It could be permission problem. A reboot may solve the problem too.

[1]:

[To see links please register here]

[2]:

[To see links please register here]

Reply

#6
I know this is an old post, but I just had this problem (continued sqlite3 issues with Windows), and while rebooting, shutting the command line, and stopping the server didn't work, I did manage to solve it by actually running each of the commands htanta mentioned above sequentially:
1. bundle exec rake db:drop
2. bundle exec rake db:create
3. bundle exec rake db:migrate

If db:reset is only these commands anyway, I don't understand why it doesn't work but the individual commands do?
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through