What versions of Ruby should a gem support?

So I was submitting a pull request to try and fix a gem with broken tests on JRuby, Ruby 1.9.3, 2.1, 2.2., 2.4.0dev, JRuby-19mode, rbx-19 mode and it the fix passed Ruby 2.x MRI implementations but not 1.9.3, JRuby or rbx implementations. And it got me thinking - what do folks expect in terms of ruby version support for their gems?

I’ve mostly used MRI, so that’s what I expect and/or typically care about, but I wonder what is the “best practice” if any? Or is it purely up to the author since it’s open source land and they are volunteering their time?

1 Like

regarding MRI, Ruby 2.1+ is the latest supporting version from the core team, both 1.9.3 and 2.0 has met their EOL. 2.4.0dev is not stable yet so you can make allowed_failure.


I write my gems with 2.0 syntax. If you submit a pull request that fixes support for more and it doesn’t deviate in design I think that’s generally acceptable.


2.0 and up should be okay for most people, you might want 1.9 as well though.