From f820dc2dea3775f6c05c5ca77631ac27a9d3c954 Mon Sep 17 00:00:00 2001 From: Lars Kanis Date: Wed, 10 Jan 2018 20:40:08 +0100 Subject: PostgreSQL: Allow pg-1.0 gem to be used with ActiveRecord pg-1.0.0 is just released and most Gemfiles don't restrict it's version. But the version is checked when connecting to the database, which leads to the following error: Gem::LoadError: can't activate pg (~> 0.18), already activated pg-1.0.0 See also this pg issue: https://bitbucket.org/ged/ruby-pg/issues/270/pg-100-x64-mingw32-rails-server-not-start Preparation for pg-1.0 was done in commit f28a331023fab, but the pg version constraint was not yet relaxed. --- .../lib/active_record/connection_adapters/postgresql_adapter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index 441be47fa1..9ac5a8760e 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # Make sure we're using pg high enough for type casts and Ruby 2.2+ compatibility -gem "pg", "~> 0.18" +gem "pg", ">= 0.18", "< 2.0" require "pg" require "active_record/connection_adapters/abstract_adapter" -- cgit v1.2.3