pg_dump版本在Rails中不匹配 [英] pg_dump version mismatch in Rails

查看:107
本文介绍了pg_dump版本在Rails中不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在运行 rake db:structure:dump 命令时,遇到以下错误:

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

如何更新pg_dump?我已经安装了pg 9.1.3,有没有办法将Rails内部的引用更新到新版本?

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?

当我尝试通过自制程序更新postgres时,我得到了以下输出:

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:

酿造更新

,如果出现此错误: 错误:您对以下文件的本地更改将被合并覆盖:

然后:

cd /usr/local/cellar
git reset --hard FETCH_HEAD

完成自制软件更新后:

sudo brew install postgresql

将安装9.1.3(或pg的最新版本)和所有依赖项。

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.

这篇关于pg_dump版本在Rails中不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆