aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
diff options
context:
space:
mode:
authorMatt Brictson <matt@mattbrictson.com>2015-03-11 22:12:47 -0700
committerMatt Brictson <matt@mattbrictson.com>2015-03-11 22:23:36 -0700
commitba7532700f194aae2f9968924f979d77bc84a21e (patch)
tree4af4f3bd3439cd566ddd6eea68e39b6860bc816d /activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
parentfd3e63e2d9701f995f56c3dd6dcd30c73bd518b2 (diff)
downloadrails-ba7532700f194aae2f9968924f979d77bc84a21e.tar.gz
rails-ba7532700f194aae2f9968924f979d77bc84a21e.tar.bz2
rails-ba7532700f194aae2f9968924f979d77bc84a21e.zip
Require pg~>0.18 to ensure Ruby 2.2 compatibility
Versions of the pg gem earlier than 0.18.0 cannot be used safely with Ruby 2.2. Specifically, pg 0.17 when used with Ruby 2.2 has a known bug that causes random bits to be added to the end of strings. Further explanation here: https://bitbucket.org/ged/ruby-pg/issue/210/crazy-bytes-being-added-to-record
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
index 92f470ae70..96a3ac7c31 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -12,8 +12,8 @@ require "active_record/connection_adapters/statement_pool"
require 'arel/visitors/bind_visitor'
-# Make sure we're using pg high enough for PGResult#values
-gem 'pg', '~> 0.15'
+# Make sure we're using pg high enough for Ruby 2.2+ compatibility
+gem 'pg', '~> 0.18'
require 'pg'
require 'ipaddr'