MonetizeDesign
Home
Code
Phantdom
jQuery SEO Preview
Rails Scaffold Generator
Rackup Framework
CSS Framework
About
Blog
Github
home
/
docs
/
Ruby on Rails
/
Populate Local Database
Populate Local Database
To pull from your `postgres` production database on Heroku you can create a file inside of `bin` folder and call it `populate` without an extension. Inside the file you can add heroku pull code: ``` heroku pg:pull DATABASE_URL yourapp_development --app yourapp ``` Then you run the command in terminal or hyperjs. ``` $ bin/populate; rake db:migrate ``` This will run the heroku `pg:pull` command and then run `rake db:migrate` to ensure you local database is ready to go. If you run into errors make sure to delete your local development database. ``` $ rake db:drop ``` If you are using an app like Postico for Mac to view local database make sure to close that connection.
Last edited about 1 year ago by
wynter