Skip to content

Instantly share code, notes, and snippets.

@emailrhoads
Last active March 26, 2020 15:50
Show Gist options
  • Select an option

  • Save emailrhoads/6029fa6dfbc77c936ce3b276bef09c50 to your computer and use it in GitHub Desktop.

Select an option

Save emailrhoads/6029fa6dfbc77c936ce3b276bef09c50 to your computer and use it in GitHub Desktop.
[Rebuild Test Database] #rails #rspec

If getting farts about environment var not being set

bundle exec rails db:environment:set RAILS_ENV=test
export RAILS_ENV=test

Gemini & where db:structure is involved

RAILS_ENV=test bundle exec rake db:drop db:create db:structure:load db:migrate db:seed

apps where structure.sql not tracked/managed

RAILS_ENV=test bundle exec rake db:drop db:create db:migrate db:seed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment