Rails:如何连接到旧的PostgreSQL(您的PostgreSQL(70417)版本太旧了,请升级!) [英] Rails: How to connect to an old PostgreSQL (Your version of PostgreSQL (70417) is too old, please upgrade!)

查看:107
本文介绍了Rails:如何连接到旧的PostgreSQL(您的PostgreSQL(70417)版本太旧了,请升级!)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试建立与远程PostgreSQL的连接,出现错误:

Trying to setup a connection to a remote PostgreSQL, I get the error:


RuntimeError:您的PostgreSQL版本(70417)为太旧了,请升级!来自/Users/panayi/.rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems的

/activerecord-3.2.11/lib/active_record/connection_adapters
/postgresql_adapter.rb:331:in'initialize'

RuntimeError: Your version of PostgreSQL (70417) is too old, please upgrade! from /Users/panayi/.rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems /activerecord-3.2.11/lib/active_record/connection_adapters /postgresql_adapter.rb:331:in `initialize'

我无权访问PostgreSQL,所以没有升级方式。我尝试使用较旧的 pg gem:

I don't have access to the PostgreSQL, so there is no way to upgrade. I've tried to use an older pg gem:

# Gemfile
gem  'pg', '~> 0.9.0'

但是我得到:


LoadError:请安装postgresql适配器: gem install
activerecord-postgresql-adapter
(无法激活pg(〜 > 0.11),已经
激活了pg-0.9.0。确保所有依赖项都已添加到Gemfile中。)

LoadError: Please install the postgresql adapter: gem install activerecord-postgresql-adapter (can't activate pg (~> 0.11), already activated pg-0.9.0. Make sure all dependencies are added to Gemfile.)

I

推荐答案

我将其作为答案,因此它会被注意到,但恐怕并非如此。

I'm putting this as an answer so it gets noticed, but I'm afraid it's not one.

告诉我,该数字并不表示您正在使用 7.4.17 。不仅在2010年被标记为寿命终止 ,但您错过了

Please, please, please tell me that number doesn't mean you're using 7.4.17. That's not only been marked end-of-life back in 2010 but you're missing over a dozen bugfix releases in the 7.4 series.

与负责数据库的人联系,并敦促他们至少将其更新至最新的7.4。然后提醒他们,如果他们不迁移到最近的事物,就不太可能在他们将来可能遇到的任何问题上获得很多帮助。

Contact whoever is responsible for the database and urge them to update to the latest 7.4 at the very least. Then remind them that if they don't move to something more recent they're unlikely to get much help with any future problems they might encounter.

这篇关于Rails:如何连接到旧的PostgreSQL(您的PostgreSQL(70417)版本太旧了,请升级!)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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