Reputation: 2265
I am using rails with postgres database, I am trying to do a rake db:migrate and I obtain this error.
server version: 9.3.2; pg_dump version: 9.1.9
pg_dump: aborting because of server version mismatch
rake aborted!
I have both version of postgres 9.3.2 and 9.1.9 but how activate the last one!!!
postgres 67 0,0 0,1 2476740 7768 ?? Ss 9:07AM 0:00.18 /Library/PostgreSQL/9.1/bin/postmaster -D/Library/PostgreSQL/9.1/data
postgres 66 0,0 0,2 2592204 13700 ?? Ss 9:07AM 0:00.19 /Library/PostgreSQL/9.3/bin/postmaster -D/Library/PostgreSQL/9.3/data
Upvotes: 2
Views: 607
Reputation: 491
One solution would be to install Postgres 9.3 with homebrew, and the edit your .bash_profile to direct your $PATH to Postgres 9.3, (and subsequently pg_dump 9.3)
export PATH=/usr/local/bin:$PATH
Not the greatest solution, but if you're using a Mac a version of Postgres is already installed and homebrew installs another in a different location.
If you don't want to go through all of that, I'd check out this documentation: http://www.postgresql.org/docs/9.3/static/pgupgrade.html
Upvotes: 1