Skip to content

Seed the DB on Heroku

Patrick Bolger edited this page Jul 14, 2017 · 1 revision

The following assumes that you have the Heroku CLI installed on your machine, and that you are a collaborator (or owner) of the shf-project.

You should see the project when you run the CLI command heroku list, for example:

Patricks-MBP:shf-project pbolger$ heroku list
=== [email protected] Apps
pets-patrick
shf-test

=== Collaborated Apps
pets-cruncher  [email protected]
pets-dev       [email protected]
pets-master    [email protected]
shf-project    [email protected]
  1. Delete all data from the DB:
heroku pg:reset --app shf-project
  1. Connect to heroku and start a bash shell:
heroku run bash -a shf-project
  1. Create the DB schema:
rake db:migrate
  1. Seed the DB:
rake db:seed
  1. Exit from the bash shell (exit)
Clone this wiki locally