ShakaCode | ShakaCode Blog | Rails On Maui Blog | Rails | ReactJs | JavaScript | Webpack | Productivity |

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?


I think “it depends” on the user base of the gem. For, we’re only supporting Ruby 2.0 and above for example.