Ruby on Rails / PostgreSQL Version Compatibility

Skip to first unread message

Don P

Mar 2, 2021, 10:44:59 AM3/2/21
to ruby-pg
I am currently upgrading a few Rails apps from 4.1.8 up the ladder to Rails 6 and finding some difficulty understanding which version of the `pg` gem should work with the various Rails and PostgreSQL versions.  Some issues: 

  1. ActiveRecord::StatementInvalid (PG::UndefinedColumn: ERROR:  column "increment_by" does not exist  , pg gem version 0.21, PostgreSQL 10.  Which version of the gem supports later versions of PostgreSQL? 
  2. If I upgrade to pg > 1.0.0, I get a different error: Specified 'postgresql' for database adapter, but the gem is not loaded. Add `gem 'pg'` to your Gemfile 
  3. Has anyone written a version compatibility matrix? 
  4. Has anyone written a migration guide up the versions?  
I would be willing to contribuite on #3 and #4, just wondering first if anything exists.  


Don P

Mar 2, 2021, 10:51:49 AM3/2/21
to ruby-pg
Version compatibility finding #1:  Rails 5.1.5. is required to use pg gem 1.0 or higher. 
Reply all
Reply to author
0 new messages