[英]server version: 9.3.2; pg_dump version: 9.1.9 rails with postgres
I am using rails with postgres database, I am trying to do a rake db:migrate and I obtain this error. 我在postgres数据库中使用rails,试图在rake db:migrate中获取此错误。
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 9.3.2和9.1.9的两个版本,但是如何激活最后一个版本!
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
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) 一种解决方案是使用自制软件安装Postgres 9.3,然后编辑.bash_profile以将$ PATH定向到Postgres 9.3(以及随后的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. 这不是最好的解决方案,但是如果您使用的是Mac,则已经安装了Postgres版本,并且自制软件会在其他位置安装另一个版本。
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 如果您不想全部处理,请查看以下文档: http : //www.postgresql.org/docs/9.3/static/pgupgrade.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.