Skip to content

Instantly share code, notes, and snippets.

@bbugh
Created October 17, 2012 18:06
Show Gist options
  • Save bbugh/3907096 to your computer and use it in GitHub Desktop.
Save bbugh/3907096 to your computer and use it in GitHub Desktop.
Drop and recreate test database

I would recommend dropping your test database, then re-create it and migrate:

bundle exec rake db:drop RAILS_ENV=test
bundle exec rake db:create RAILS_ENV=test
bundle exec rake db:schema:load RAILS_ENV=test

Shorter:

bundle exec rake db:drop db:create db:schema:load RAILS_ENV=test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment