Your PostgreSQL is too old- error on centos 6.5 服务器
Your PostgreSQL is too old- error on centos 6.5 server
我正在尝试 运行 bundle install
.
但我收到错误消息,这是我来自控制台的错误日志-
Your PostgreSQL is too old. Either install an older version of this gem or upgrade your database to
at least PostgreSQL-9.2.
宝石文件
gem 'pg'
postgres --version
postgres (PostgreSQL) 8.4.20
如何在不更新 centos 服务器上的 postgres 数据库的情况下解决此错误?
我同意你应该更新你的 postgres 的评论,因为它已经将近 10 年了,而且你使用的是非常旧版本的数据库,所以它非常危险。
您可以通过编辑 Gem 文件并在其中输入以下行而不是以下内容来降级 PG gem 版本
gem 'pg'
至
gem 'pg', '~> 0.11'
现在运行命令
bundle
并尝试 运行 它应该有效。正如我在 Rails 6 上试过的那样,它运行得很顺利,但是 gem 会发生很多变化,因为现在它是版本 2+,而你使用的是之前的版本 1。
我正在尝试 运行 bundle install
.
但我收到错误消息,这是我来自控制台的错误日志-
Your PostgreSQL is too old. Either install an older version of this gem or upgrade your database to
at least PostgreSQL-9.2.
宝石文件
gem 'pg'
postgres --version
postgres (PostgreSQL) 8.4.20
如何在不更新 centos 服务器上的 postgres 数据库的情况下解决此错误?
我同意你应该更新你的 postgres 的评论,因为它已经将近 10 年了,而且你使用的是非常旧版本的数据库,所以它非常危险。
您可以通过编辑 Gem 文件并在其中输入以下行而不是以下内容来降级 PG gem 版本
gem 'pg'
至
gem 'pg', '~> 0.11'
现在运行命令
bundle
并尝试 运行 它应该有效。正如我在 Rails 6 上试过的那样,它运行得很顺利,但是 gem 会发生很多变化,因为现在它是版本 2+,而你使用的是之前的版本 1。