<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><br id="lineBreakAtBeginningOfMessage"><div><br><blockquote type="cite"><div>On Mar 17, 2024, at 12:57 AM, Austin Ziegler <halostatue@gmail.com> wrote:</div><br class="Apple-interchange-newline"><div><div dir="ltr">I am most definitely a Ruby expert, but I have yet to run any version of Ruby from MacPorts (because I use `ruby-build` and `mise` to build versions of Ruby that I require), and I almost exclusively install Ruby packages via `gem install`.</div></div></blockquote><div><br></div><div>You could perhaps try sudo port install ruby33 or whatever needed?</div><div>I have no idea what is going on with archaic versions, but Ruby 3.1+ through ruby-devel (3.4) should work on every system.</div><br><blockquote type="cite"><div dir="ltr"><div>Many gemspecs contain information about the minimum Ruby that they require to run (mime-types 3 requires Ruby 2+, <a href="https://github.com/mime-types/ruby-mime-types/blob/main/mime-types.gemspec#L20">https://github.com/mime-types/ruby-mime-types/blob/main/mime-types.gemspec#L20</a>; diff-lcs advertises compatibility with Ruby 1.8+; app_identity advertises Ruby 2.7+, but not Ruby 4, <a href="https://github.com/KineticCafe/app_identity/blob/8afdd1caaab8d18032f60416eb62add88d308ee0/ruby/app_identity.gemspec#L21">https://github.com/KineticCafe/app_identity/blob/8afdd1caaab8d18032f60416eb62add88d308ee0/ruby/app_identity.gemspec#L21</a>).</div></div></blockquote><div><br></div><div>What I mean is that gemspec files often require a version of some another gem using ~> instead of >= like <a href="https://rubygems.org/gems/t">https://rubygems.org/gems/t</a></div><div>That prevents gems from running if a dependency is newer. For example, rb-launchy is at 3.0.0: <a href="https://rubygems.org/gems/launchy">https://rubygems.org/gems/launchy</a></div><div>Then I need to do something like this: <a href="https://github.com/macports/macports-ports/blob/c778ebc838a41e5761b76e7c6bc5a7ec3c256ab2/ruby/rb-t/Portfile#L30-L33">https://github.com/macports/macports-ports/blob/c778ebc838a41e5761b76e7c6bc5a7ec3c256ab2/ruby/rb-t/Portfile#L30-L33</a></div><div>Problem is that this is quite painful to deal with for every relevant case.</div><br><blockquote type="cite"><div><div dir="ltr"><div>I don't know whether the Ruby and various gem ports are set up to work like the Python and package ports (e.g., py311, py311-requests), but as each gem must be installed into each Ruby, that's the best approach to use (e.g., for *every* Ruby port, there should be Ruby version ports; rb-diff-lcs and rb19-diff-lcs should have versions for rb18, rb19, rb20, rb21, rb22, rb23, rb24, rb25, rb26, rb27, rb30, rb31, rb32, and rb33).</div><div><br></div><div>I also think that the `ruby` port needs to be renamed to `ruby18` and `port install ruby` should *either* fail (like `port install python` or `port install python3` does) or it should install the latest stable version (updated on Christmas Day every year).</div></div></div></blockquote><div><br></div><div>They are, and everything relevant is rb33-* etc. Unversioned one which use rb18 should re updated or removed: we have no reason to keep Ruby versions prior to 3.0, since 3.0 works on Tiger, and 3.1+ work on Leopard through Sonoma. That also includes PowerPC systems.</div><br><blockquote type="cite"><div><div dir="ltr"><div>*Or* there should be an option with Ruby ports to treat them like non-offline Go ports and allow them to do `gem install` or `bundle install` for more complex environments.</div><div><br></div><div>Unfortunately, my tcl isn't really good enough (aside from what bits of Tcl I’ve done now that I am contributing to MacPorts port maintenance, I last used Tcl in about 2004) to start working with rethinking the Ruby portgroup to have something like `ruby.bundle` or `ruby.gems` that works like `cargo.crates` or `go.vendors`, which would *probably* be the better choice (and it would pull from `<a href="http://rubygems.org/">rubygems.org</a>` *not* <a href="http://github.com/">github.com</a>; gems are source distributions most of the time, although some gems exist that contain precompiled binaries for hard-to-build dependencies).</div></div></div></blockquote><br></div><div>I think that is done in most of the case already.</div><div>Only a few Ruby ports use GitHub, and that is either historically (and should be switched to RubyGems) or for a specific reason.</div><div><a href="https://ports.macports.org/port/rb33-sup/details">https://ports.macports.org/port/rb33-sup/details</a></div><div><a href="https://github.com/macports/macports-ports/blob/c778ebc838a41e5761b76e7c6bc5a7ec3c256ab2/ruby/rb-sup/Portfile#L7-L16">https://github.com/macports/macports-ports/blob/c778ebc838a41e5761b76e7c6bc5a7ec3c256ab2/ruby/rb-sup/Portfile#L7-L16</a></div><div><br></div><div>Precompiled libs is a problem, unfortunately, and some upstream is not interested to bother fixing it.</div><div><a href="https://github.com/ankane/lightgbm-ruby/issues/7">https://github.com/ankane/lightgbm-ruby/issues/7</a></div><div>In result, that is a broken package.</div><div><br></div><br></body></html>