`gem update` fails on 4.0.9: minitest binstub not patched for RubyGems overwrite detection
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- ruby
- Ambito
- build-system
Direzione di ricerca
Start with libexec/package.rb, especially patch_executables, and compare its shebang matching with the minitest executable described in the issue. Review the proposed fork commit and the existing fix for issue #6 to understand the intended RubyGems marker behavior. Done means Ruby shebang variants are patched and a runtime check catches bundled gem executables RubyGems would overwrite during an offline reinstall.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What were you trying to do when you hit this?
Updating my installed gems with gem update.
What you ran
gem update on Ruby 4.0.9 (ruby-4.0.9.macos.tar.gz), installed via mise 2026.11.14 on macOS 27.2.1 arm64.
What happened
minitest's executable "minitest" conflicts with .../installs/ruby/4.0.9/bin/minitest
Overwrite the executable? [yN]
ERROR: Error installing minitest:
"minitest" from minitest conflicts with .../installs/ruby/4.0.9/bin/minitest
minitest stays at the bundled 6.0.0. I expected it to update to 6.1.0. gem update rake on the same install works.
Version
Ruby 4.0.9, macOS arm64
Cause and fix
This is the same RubyGems overwrite detection that #6 fixed for rbs. patch_executables only matches #!/usr/bin/env ruby, but minitest 6, which is bundled from Ruby 4.0, starts its executable with #!/usr/bin/env -S ruby. Its binstub is never patched.
PRs are limited to collaborators, so the fix is on my fork: https://github.com/ArloL/ruby/commit/63e57f301fd83faba926f36d6c797b1bb3e3bba7
- Match any Ruby shebang (
^#!.*ruby.*\n) when adding the RubyGems marker. - Add a runtime check that reinstalls every bundled gem with an executable from its cached
.gem(offline). A binstub RubyGems won't overwrite now fails the build.
On the 4.0.9 macOS release tarball, the new check fails at minitest on the released binstubs and passes after the fix. With the marker stripped from all stubs (the #6 bug), it fails at bootsnap.
I hit this during a routine gem update. Claude Code helped me trace the cause and write the fix.
- Lingua principale
- Ruby
- Stelle
- 47
- Fork
- 9
- Merge medio
- 2h 41m
- PR unite (30g)
- 6
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Issue simili
-
CONTRIBUTING test list is missing diff_before_build and rulesForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertagood first issue help wanted
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
erkamyaman/rust-anything#702 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
slovensko-digital/govbox-pro#986 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: security/hardcoded-secret flags `${{ secrets.X }}` references in GitHub Actions workflowsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
scanaislop/aislop#589 ·
I maintainer di solito rispondono entro 1 giorno