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
pg_dump is a utility for backing up a PostgreSQL database. It makes consistent backups even if the database is being used concurrently. pg_dump does not block other users accessing the database (readers or writers). pg_dump only dumps a single database.
Here's how I resolved the issue, first update homebrew:
brew update
if you get this error: error: Your local changes to the following files would be overwritten by merge:
then:
cd /usr/local/cellar
git reset --hard FETCH_HEAD
After you finish updating homebrew: sudo brew install postgresql
Which will install 9.1.3 (or the most current version of pg) and any dependencies.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With