Skip to content

Replace ruby18 shebangs with the system ruby - #47

Merged
dayglojesus merged 2 commits into
mainfrom
fix/ruby18-shebangs
Aug 25, 2026
Merged

Replace ruby18 shebangs with the system ruby#47
dayglojesus merged 2 commits into
mainfrom
fix/ruby18-shebangs

Conversation

@dayglojesus

Copy link
Copy Markdown
Collaborator

macOS has no ruby18. On macOS 26.5 /usr/bin/ruby is 2.6.10 and nothing named ruby18 is on PATH, so every command carrying that shebang dies at exec with env: ruby18: No such file or directory (exit 127).

Two sites in this repo:

  • Avian.tmbundle (4 commands) — shipped in Contents/SharedSupport/Bundles and has no upstream repo of its own, so it is fixed in place.
  • The Bundle Editor templates (Frameworks/BundleEditor/templates/Command.plist, Drag Command.plist) — these were minting a ruby18 shebang into every newly created command and drag command, so the problem kept regenerating itself.

Applications/TextMate/support/Bundles/Source.tmbundle carries the same shebang but is deliberately left alone here: it is vendored by bin/fetch_embedded_bundles.sh at the SHA pinned in Frameworks/BundlesManager/src/MandatoryBundles.h, and hand-editing it would desync the .sha marker. It follows once textmatelives/source.tmbundle#1 merges and the pin is bumped.

The other 15 bundle repos are covered by companion PRs (48 files total).

Refs #45

macOS has no `ruby18`. On macOS 26.5 `/usr/bin/ruby` is 2.6.10 and
nothing named `ruby18` is on PATH, so every command carrying that
shebang dies at exec with:

    env: ruby18: No such file or directory

Two sites in this repo:

  * Avian.tmbundle — shipped in Contents/SharedSupport/Bundles and has
    no upstream repo of its own, so it is fixed in place.
  * The Bundle Editor command templates, which were minting a ruby18
    shebang into every newly created command and drag command.

Source.tmbundle carries the same shebang but is vendored by
bin/fetch_embedded_bundles.sh at the SHA pinned in
Frameworks/BundlesManager/src/MandatoryBundles.h. It follows once
textmatelives/source.tmbundle#1 merges and the pin is bumped.

Refs #45
Ruby 2.6 prints

    warning: -K is specified; it is for 1.8 compatibility and may cause odd behavior

on stderr for every single run. Dropping the flag outright is not enough:
with no locale set, Encoding.default_external falls back to US-ASCII,
which is exactly what -KU was there to prevent. -Eutf-8 asks for the same
thing in 1.9+ terms.

Covers the four Avian commands, both Bundle Editor templates and
bin/show_log.

Refs #45
@dayglojesus
dayglojesus merged commit f63cff2 into main Aug 25, 2026
2 checks passed
This was referenced Aug 27, 2026
@dayglojesus
dayglojesus deleted the fix/ruby18-shebangs branch August 27, 2026 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant