DEV Community

Allison
Allison

Posted on • Originally published at github.com

gemcompat: an open source db of undocumented gem incompatibilities with rails

TLDR: We created an open database of every gem version that’s silently incompatible with Rails. Check it out at https://github.com/infieldai/gemcompat

Our company is built on Rails, and part of our work involves upgrading Rails apps for our customers. In doing this we come across incompatibilities between packages that aren’t captured in gemspecs. Commonly a package will leave an open-ended upper bound in their gemspec (like activerecord >= 6.1) which can cause issues if the next version of Rails comes out and breaks something. I once tracked down an incompatibility between two packages that only surfaced as colors in images embedded in PDFs being inverted. These can waste a lot of time.

Last month we shared a script that checks an application against these kinds of issues for Rails 7.1. It was based on research we did reading a few thousand ruby changelogs looking for messages like “Added support for Rails 7.1.” People found it useful so we thought we’d turn it into a more complete project.

We’ve open sourced all the incompatibilities we know about across Rails 6.1, 7.0, and 7.1 at https://github.com/infieldai/gemcompat/. You can check your own codebase like this:

gem install gemcompat

gemcompat –package rails –target-version 7.1 –lockfile Gemfile.lock

Hope this is useful! We’d love you to try it out and let us know when you come across an incompatibility we don’t have. You can open a Github issue with anything you find and we’ll add it to the DB.

Top comments (0)