简体   繁体   English

服务器版本:9.3.2; pg_dump版本:带有Postgres的9.1.9 rails

[英]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.

相关问题 从IntelliJ IDea运行时,位于相同路径的psql和pg_dump在Rakefile中返回不同的版本信息 - psql and pg_dump at same paths return different version information in Rakefile when run from IntelliJ IDea pg_dump-权限被拒绝(db:structure:dump) - pg_dump - permission denied (db:structure:dump) mongrel_rails和pg版本问题 - mongrel_rails and pg version issue rake db:structure:dump失败postgresql没有这样的文件或目录pg_dump - rake db:structure:dump fails postgresql no such file or directory pg_dump pg_dump: [archiver (db)] 查询失败:错误:关系 abouts 的权限被拒绝 - pg_dump: [archiver (db)] query failed: ERROR: permission denied for relation abouts 将窗体版本4切换到版本3后,rails服务器无法启动 - rails server not starting after switching form version 4 to version 3 将postgres ENUM与rails结合使用可产生PG :: DatatypeMismatch - Using postgres ENUM with rails yields `PG::DatatypeMismatch` 运行Rails服务器时出错,检查Rails版本时出错 - Error while running rails server, errors while checking the rails version 运行 Rails 服务器时,asdf 消息“没有为命令 rails 设置版本” - asdf message “No version set for command rails” when running Rails server 我在托管Rails网站的服务器上找不到Rails版本 - I can't find rails version on the server that host a rails website
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM