If you first need to get the app from Heroku, clone your app.
To do this, write in your terminal:
heroku git:clone -a your_app_name
If you already have an application and a remote for the hero, follow these steps. If not, you can check the instructions here https://devcenter.heroku.com/articles/git
Write in your terminal:
heroku pg:info -a your_app_name
it will look something like this:
HEROKU_POSTGRESQL_MAROON_URL
- Find the name of your local database
In a Rails application, go to config / database.yml
it will look something like this:
your_app_name_development
- Cloning your production database (PostgreSQL)
Write your own database names in your Terminal:
heroku pg:pull HEROKU_POSTGRESQL_MAROON_URL your_app_name_development -a your_app_name
HEROKU_POSTGRESQL_MAROON_URL - an example of how the name of your production database (in Heroku) could be: my_app_name_development - the name of your development database (locally) the_name_of_my_app is the name of your application in Heroku
Remember to complete this by installing the package ...
georgecodes May 13 '15 at 10:37 p.m. 2015-05-13 22:37
source share