diff --git a/paper_trail.gemspec b/paper_trail.gemspec index 5484d8fae..1103430d0 100644 --- a/paper_trail.gemspec +++ b/paper_trail.gemspec @@ -42,7 +42,13 @@ Gem::Specification.new do |s| s.add_development_dependency "activerecord-jdbcmysql-adapter", "~> 1.3.15" else s.add_development_dependency "sqlite3", "~> 1.2" - s.add_development_dependency "pg", "~> 0.17" + + # pg 0.19 requires ruby >= 2.0.0 + if ::Gem.ruby_version >= ::Gem::Version.new("2.0.0") + s.add_development_dependency "pg", "~> 0.19.0" + else + s.add_development_dependency "pg", [">= 0.17", "< 0.19"] + end # activerecord >= 4.2.5 may use mysql2 >= 0.4 s.add_development_dependency "mysql2", "~> 0.4.2"