When running the rake db:structure:dump command, I encountered the following error:
Larson-2:app larson$ rake db:structure:dump
pg_dump: server version: 9.1.3; pg_dump version: 9.0.4
pg_dump: aborting because of server version mismatch
rake aborted!
Error dumping database
How can I go about updating pg_dump? I have pg 9.1.3 installed, is there a way to update the references inside of Rails to the new version?
When I try to update postgres via homebrew, I get the following output:
Larson-2:app larson$ sudo brew upgrade postgresql
Password:
Error: postgresql already upgraded
Here’s how I resolved the issue, first update homebrew:
brew updateif you get this error:
error: Your local changes to the following files would be overwritten by merge:then:
After you finish updating homebrew:
sudo brew install postgresqlWhich will install 9.1.3 (or the most current version of pg) and any dependencies.