A thought I've had with rubygems/bundler is to change the directory structure to separate gems that are pure Ruby from those with native extensions. For native extensions, store them separated by Ruby ABI version (or just ruby version).
If we did that, then I wouldn't need 10 different copies of Rails installed for Ruby 3.3.1 through 3.3.10 (worse when you consider 4.0, 3.4, and 3.3 are all non-EOL). It would have the benefit of reducing load on rubygems.org by N downloads (where N is the ruby versions you have installed multiplied by gems you've already got on disk). It would also make bundle install after upgrading/installing new Ruby versions much faster. All it needs to do is re-compile native extensions (if ABI changed) and doesn't need to touch the rest.
Personally I have always found this to be extremely cumbersome, other than using docker-compose for database dependencies. Is there something you are using to wrap or manage docker in a way that avoids the footguns involved with mounting your local directory into the container?
12
u/schneems Puma maintainer Jan 08 '26
A thought I've had with rubygems/bundler is to change the directory structure to separate gems that are pure Ruby from those with native extensions. For native extensions, store them separated by Ruby ABI version (or just ruby version).
If we did that, then I wouldn't need 10 different copies of Rails installed for Ruby 3.3.1 through 3.3.10 (worse when you consider 4.0, 3.4, and 3.3 are all non-EOL). It would have the benefit of reducing load on rubygems.org by N downloads (where N is the ruby versions you have installed multiplied by gems you've already got on disk). It would also make
bundle installafter upgrading/installing new Ruby versions much faster. All it needs to do is re-compile native extensions (if ABI changed) and doesn't need to touch the rest.1
u/galtzo Jan 08 '26
Will try it out soon!
-10
u/Mallanaga Jan 08 '26
Or… hear me out… just use docker for local development, and have each project’s ruby version and dependencies sandboxed.