3

Similar to this question I've updated both homebrew and postgresql. But I'm not sure how to connect this rails app with the updated version I installed. It clearly is still using 9.0.5 which was on the system, but I have 9.1.4 installed via homebrew, how do I change this to link it up?

Here's the error I'm getting after running rake db:migrate:

pg_dump: server version: 9.1.4; pg_dump version: 9.0.5
pg_dump: aborting because of server version mismatch
rake aborted!
Error dumping database
Community
  • 1
  • 1
sacshu
  • 397
  • 9
  • 20
  • When using the "custom" format for a dump file, you should always dump with the same version of PostgreSQL you will be using for the restore, even if it doesn't match the database you are dumping. This should normally match the version into which you intend to restore the dump. Sorry I can't help with how to wrangle RoR/rake into behaving that way. – kgrittn Aug 21 '12 at 00:01

1 Answers1

3

I expect that you need to update your PATH environment variable so that rake finds the new pg_dump on the PATH before the old one, unless there's a Rails-specific way to configure the pg_dump path explicitly.

Updating your PATH:

Community
  • 1
  • 1
Craig Ringer
  • 307,061
  • 76
  • 688
  • 778