diff options
author | Matt Brictson <matt@mattbrictson.com> | 2015-03-11 22:12:47 -0700 |
---|---|---|
committer | Matt Brictson <matt@mattbrictson.com> | 2015-03-11 22:23:36 -0700 |
commit | ba7532700f194aae2f9968924f979d77bc84a21e (patch) | |
tree | 4af4f3bd3439cd566ddd6eea68e39b6860bc816d /activerecord | |
parent | fd3e63e2d9701f995f56c3dd6dcd30c73bd518b2 (diff) | |
download | rails-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')
-rw-r--r-- | activerecord/CHANGELOG.md | 5 | ||||
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 0f99f907e8..a011579124 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,8 @@ +* Increase pg gem version requirement to `~> 0.18`. Earlier versions of the + pg gem are known to have problems with Ruby 2.2. + + *Matt Brictson* + * Correctly dump `serial` and `bigserial`. *Ryuta Kamizono* 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' |