Skip to content

Instantly share code, notes, and snippets.

@gmas
Created November 5, 2014 23:29
Show Gist options
  • Save gmas/5eba9f4d661a9528101c to your computer and use it in GitHub Desktop.
Save gmas/5eba9f4d661a9528101c to your computer and use it in GitHub Desktop.
RAILS_ENV=test be rake db:drop db:create
psql weedmaps_test
drop extension postgis
create extension postgis
RAILS_ENV=test rake db:schema:load
@laser
Copy link

laser commented Nov 5, 2014

Fun fact: You can run those psql commands from your shell like so:

RAILS_ENV=test be rake db:drop db:create
echo '\x \\ DROP EXTENSION postgis CASCADE;' | psql weedmaps_test
echo '\x \\ CREATE EXTENSION postgis;' | psql weedmaps_test
RAILS_ENV=test rake db:schema:load

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