Pg_dump updating databases


#1

Hi,

I’m using Ruby on Rails with Heroku PSQL. I’m trying to figure out a way to update my databases in production (while making sure that the user data is kept). One method was to user pg backups to download the data to my local machine (that works) But when I make changes to this db an want to push it back into production, I’m unable to.
I’ve posted my code below. I get the same output if I am logged in as the root postgres user.
Might I not have pg_dump installed with postgres? (code checking this below) And if so, how do I install it on it’s own?
Another heroku message mentioned that the path might not be correct:

“are both often a result of this incorrect $PATH problem. This problem is especially common with Postgres.app users, as the post-install step of adding /Applications/Postgres.app/Contents/MacOS/bin to $PATH is easy to forget.”

Should I change this?
Also, is there another way of doing this that I’m just not seeing.

Thanks very much.

Aideen

heroku pg:push database_development HEROKU_POSTGRESQL_MAUVE_URL --app locallyproduced
heroku-cli: Pushing database_development —> postgresql-transparent-52976
env: pg_dump: No such file or directory
pg_restore: [archiver] input file is too short (read 0, expected 5)
aideen:~/workspace/locally_produced (master) psql --version psql (PostgreSQL) 9.3.10 aideen:~/workspace/locally_produced (master) pg_dump --version
bash: pg_dump: command not found
aideen:~/workspace/locally_produced (master) $

Update Monday 10th April…
…I’m still trying to figure this one out, I’m not being allowed to use pg_dump, when I follow online posts about this, the following output is returned when I try to add pg_dump as per online.

sudo apt-get install postgresql-client
Reading package lists… Done
Building dependency tree
Reading state information… Done
Note, selecting ‘postgresql-client-9.3’ instead of 'postgresql-client’
postgresql-client-9.3 is already the newest version.
postgresql-client-9.3 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.