nix-community / bundix

Generates a Nix expression for your Bundler-managed application. [maintainer=@manveru]
163 stars 55 forks source link

Ruby versions #89

Open Matt-Yorkley opened 2 years ago

Matt-Yorkley commented 2 years ago

I'm trying to work through a few issues with gems and attempting to use Ruby 2.7.5 and/or 3.0.3 via nixpkgs, and there seem to be some weird issues around installing gems correctly and ascertaining the ruby version, and this seems relevant.

Version mapping in Bundix only includes Ruby versions from 1.8 to 2.6:

https://github.com/nix-community/bundix/blob/692e9b778ab852f63f4bf62665b29e1b52f595f1/lib/bundix.rb#L67-L77

This seems to be a hard-coded duplication of the list available versions from bundler 1.x.x (which is now very outdated):

https://github.com/rubygems/rubygems/blob/d7089abb6a3c922bfe74199c103e745bb11bd46f/lib/bundler/current_ruby.rb#L12-L22

On the other hand, the latest version of bundler in nixpkgs is now based on bundler 2.3.6 (which lists Ruby versions up to 3.0) here but in the mean time Ruby 3.1.0 and 3.1.1 have now been released.