Rails: How to connect to an old PostgreSQL (Your version of PostgreSQL (70417) is too old, please upgrade!)

末鹿安然 提交于 2019-12-23 19:26:38

问题


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

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'

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'

but then I get:

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'm stuck.


回答1:


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

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.

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.



来源:https://stackoverflow.com/questions/14975918/rails-how-to-connect-to-an-old-postgresql-your-version-of-postgresql-70417-i

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!