Skip to content

fix(ruby-install): Use ruby_install_bin to update#7350

Merged
jdx merged 1 commit intojdx:mainfrom
calebhearth:fix-ruby-install-update
Dec 17, 2025
Merged

fix(ruby-install): Use ruby_install_bin to update#7350
jdx merged 1 commit intojdx:mainfrom
calebhearth:fix-ruby-install-update

Conversation

@calebhearth
Copy link
Contributor

@calebhearth calebhearth commented Dec 17, 2025

Looking at the git log, I suspect updating ruby-install has never worked as it
seems to have always been trying to pass this flag to the directory. Here's a
snippet of output from mise i -v when bumping the Ruby version:

DEBUG install_some_versions: ruby@3.4.8
INFO  ruby@3.4.8                       install
DEBUG Updating ruby-install in /Users/caleb/Library/Caches/mise/ruby/ruby-install
DEBUG $ /Users/caleb/Library/Caches/mise/ruby/ruby-install --update
WARN  ruby build tool update error: failed to update ruby-install: Permission denied (os error 13)
INFO  ruby@3.4.8                       ruby-build
DEBUG $ sh -c -o errexit cat .ruby-version
...
DEBUG $ ~/Library/Caches/mise/ruby/ruby-install/bin/ruby-install ruby 3.4.8 --install-dir /Users/caleb/.local/share/mise/installs/ruby/3.4.8 -- --disable-install-doc --disable-install-rdoc --enable-yjit

Note that updating uses the directory path while installing correctly uses the
bin path there.


Note

Use the ruby-install binary instead of the install directory when running --update.

Written by Cursor Bugbot for commit dc07ca1. This will update automatically on new commits. Configure here.

Copilot AI review requested due to automatic review settings December 17, 2025 15:44
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug in the Ruby plugin where updating ruby-install was attempting to execute the installation directory as a command instead of the actual ruby-install binary. The fix changes the update command to use ruby_install_bin (the binary path) instead of ruby_install_path (the directory path), aligning it with how the install command correctly uses the binary path.

  • Corrects the variable used in the ruby-install update command from directory path to binary path

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jdx
Copy link
Owner

jdx commented Dec 17, 2025

bugbot run

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no bugs!


Looking at the git log, I suspect updating ruby-install has never worked as it
seems to have always been trying to pass this flag to the directory. Here's a
snippet of output from `mise i -v` when bumping the Ruby version:

    DEBUG install_some_versions: ruby@3.4.8
    INFO  ruby@3.4.8                       install
    DEBUG Updating ruby-install in /Users/caleb/Library/Caches/mise/ruby/ruby-install
    DEBUG $ /Users/caleb/Library/Caches/mise/ruby/ruby-install --update
    WARN  ruby build tool update error: failed to update ruby-install: Permission denied (os error 13)
    INFO  ruby@3.4.8                       ruby-build
    DEBUG $ sh -c -o errexit cat .ruby-version
    ...
    DEBUG $ ~/Library/Caches/mise/ruby/ruby-install/bin/ruby-install ruby 3.4.8 --install-dir /Users/caleb/.local/share/mise/installs/ruby/3.4.8 -- --disable-install-doc --disable-install-rdoc --enable-yjit

Note that updating uses the directory path while installing correctly uses the
bin path there.
@calebhearth calebhearth force-pushed the fix-ruby-install-update branch from 5df1de1 to dc07ca1 Compare December 17, 2025 20:34
@calebhearth
Copy link
Contributor Author

Ok my bad I actually tested it out this time. Here's the log showing what we produce now. I did have to set ruby.compile = false to get the ruby-install branch to run.

$ pwd
/Users/caleb/code/mise
$ cargo run use ruby@3.4.6 -v -f
...
DEBUG Updating ruby-install in /Users/caleb/Library/Caches/mise/ruby/ruby-install
DEBUG $ /Users/caleb/Library/Caches/mise/ruby/ruby-install/bin/ruby-install --update
>>> Downloading latest ruby versions ...
>>> Downloading latest jruby versions ...
>>> Downloading latest truffleruby versions ...
>>> Downloading latest truffleruby-graalvm versions ...
>>> Downloading latest mruby versions ...
Stable ruby versions:
  ruby:
    3.1.7
    3.2.9
    3.3.10
    3.4.8
  jruby:
    10.0.2.0
  truffleruby:
    25.0.0
  truffleruby-graalvm:
    25.0.0
  mruby:
    3.4.0
INFO  ruby@3.4.6                       ruby-build
...

@calebhearth
Copy link
Contributor Author

I do love the bots telling us everything is hunky-dory though.

@jdx
Copy link
Owner

jdx commented Dec 17, 2025

bugbot run

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no bugs!


@jdx jdx merged commit 7b17855 into jdx:main Dec 17, 2025
28 checks passed
jdx pushed a commit that referenced this pull request Dec 18, 2025
### 🚀 Features

- **(alias)** rename alias to tool-alias, add shell-alias command by
@jdx in [#7357](#7357)
- **(upgrade)** display summary of upgraded tools by @jdx in
[#7372](#7372)
- **(vfox)** embed vfox plugin Lua code in binary by @jdx in
[#7369](#7369)

### 🐛 Bug Fixes

- **(aqua)** add start_operations for progress reporting by @jdx in
[#7354](#7354)
- **(github)** improve asset detection for distro-specific and Swift
artifacts by @jdx in [#7347](#7347)
- **(github)** clean up static_helpers.rs and fix archive bin= option by
@jdx in [#7366](#7366)
- **(http)** add start_operations for progress reporting by @jdx in
[#7355](#7355)
- **(lockfile)** place lockfile alongside config file by @jdx in
[#7360](#7360)
- **(progress)** add start_operations to core plugins by @jdx in
[#7351](#7351)
- **(ruby-install)** Use ruby_install_bin to update by @calebhearth in
[#7350](#7350)
- **(rust)** add release_url for rust versions by @jdx in
[#7373](#7373)
- **(schema)** add `tool_alias`, mark `alias` as deprecated by @SKalt in
[#7358](#7358)
- **(toolset)** filter tools by OS in list_current_versions by @jdx in
[#7356](#7356)
- **(ubi)** only show deprecation warning during installation by @jdx in
[#7380](#7380)
- **(ui)** remove noisy "record size" message during install by @jdx in
[#7381](#7381)
- update mise-versions URL to use /tools/ prefix by @jdx in
[#7378](#7378)

### 🚜 Refactor

- **(backend)** unified AssetMatcher with checksum fetching by @jdx in
[#7370](#7370)
- **(backend)** deprecate ubi backend in favor of github by @jdx in
[#7374](#7374)
- **(toolset)** decompose mod.rs into smaller modules by @jdx in
[#7371](#7371)

### 🧪 Testing

- **(e2e)** fix and rename ubi and vfox_embedded_override tests by @jdx
in
[052ea40](052ea40)

### 📦 Registry

- add vfox-gcloud backend for gcloud by @jdx in
[#7349](#7349)
- convert amplify to use github backend by @jdx in
[#7365](#7365)
- add github backend for djinni tool by @jdx in
[#7363](#7363)
- switch glab to native gitlab backend by @jdx in
[#7364](#7364)
- add s5cmd by @jdx in [#7376](#7376)

### Chore

- **(registry)** disable flaky tests for gitu and ktlint by @jdx in
[64151cb](64151cb)
- resolve clippy warnings and add stricter CI check by @jdx in
[#7367](#7367)
- suppress dead_code warnings in asset_matcher module by @jdx in
[#7377](#7377)

### New Contributors

- @calebhearth made their first contribution in
[#7350](#7350)
jekis913 added a commit to jekis913/mise that referenced this pull request Dec 18, 2025
* upstream/main:
  fix(ui): remove noisy "record size" message during install (jdx#7381)
  test(e2e): fix and rename ubi and vfox_embedded_override tests
  fix: update mise-versions URL to use /tools/ prefix (jdx#7378)
  fix(ubi): only show deprecation warning during installation (jdx#7380)
  registry: add s5cmd (jdx#7376)
  chore: suppress dead_code warnings in asset_matcher module (jdx#7377)
  refactor(backend): deprecate ubi backend in favor of github (jdx#7374)
  fix(rust): add release_url for rust versions (jdx#7373)
  feat(vfox): embed vfox plugin Lua code in binary (jdx#7369)
  refactor(backend): unified AssetMatcher with checksum fetching (jdx#7370)
  feat(upgrade): display summary of upgraded tools (jdx#7372)
  fix(github): clean up static_helpers.rs and fix archive bin= option (jdx#7366)
  refactor(toolset): decompose mod.rs into smaller modules (jdx#7371)
  chore: resolve clippy warnings and add stricter CI check (jdx#7367)
  registry: switch glab to native gitlab backend (jdx#7364)
  fix(ruby-install): Use ruby_install_bin to update (jdx#7350)
  registry: add github backend for djinni tool (jdx#7363)
  registry: convert amplify to use github backend (jdx#7365)
  chore(registry): disable flaky tests for gitu and ktlint
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.

3 participants