Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(rubygems_plugin): Replace which ruby check for Windows compatibility #4358

Merged
merged 1 commit into from
Feb 14, 2025

Conversation

genskyff
Copy link
Contributor

Replace which ruby command with RbConfig::CONFIG check to ensure cross-platform compatibility, particularly for Windows environments where which is not available.

When running bundle update on Windows, the following error occurs:

❯ bundle update
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
--- ERROR REPORT TEMPLATE -------------------------------------------------------
Errno::ENOENT: No such file or directory - which ruby
<path_to_mise>/mise/current/mise/installs/ruby/3.4.1/lib/ruby/site_ruby/rubygems_plugin.rb:12:in 'Kernel#`'

The error occurs because the which command does not exist on Windows systems. This PR replaces the command with RbConfig::CONFIG check to make the Ruby detection more platform-agnostic.

@genskyff genskyff force-pushed the fix/ruby-exist-command branch from d203561 to 6d4020a Compare February 13, 2025 13:51
@jdx jdx merged commit bbfce59 into jdx:main Feb 14, 2025
18 checks passed
jdx pushed a commit that referenced this pull request Feb 14, 2025
### 🚀 Features

- **(registry)** add e1s by
[@kiwamizamurai](https://github.com/kiwamizamurai) in
[#4363](#4363)
- **(registry)** add 'marksman' via 'aqua:artempyanykh/marksman' backend
by [@iamoeg](https://github.com/iamoeg) in
[#4357](#4357)
- use `machengine.org` for downloading nominated zig versions by
[@hadronomy](https://github.com/hadronomy) in
[#4356](#4356)

### 🐛 Bug Fixes

- **(aqua)** apply override of version_prefix by
[@risu729](https://github.com/risu729) in
[#4338](#4338)
- **(env_directive)** apply redactions only to env with redact by
[@risu729](https://github.com/risu729) in
[#4388](#4388)
- **(hook_env)** don't exit early if watching files are deleted by
[@risu729](https://github.com/risu729) in
[#4390](#4390)
- **(rubygems_plugin)** Replace which ruby check for Windows
compatibility by [@genskyff](https://github.com/genskyff) in
[#4358](#4358)
- lowercase desired shim names by
[@KevSlashNull](https://github.com/KevSlashNull) in
[#4333](#4333)
- allow cosign opts to be empty in aqua by
[@IxDay](https://github.com/IxDay) in
[#4396](#4396)

### 📚 Documentation

- update Fedora install for dnf5 by [@rkben](https://github.com/rkben)
in [#4387](#4387)
- fix links to idiomatic version file option by
[@pietrodn](https://github.com/pietrodn) in
[#4382](#4382)
- add mise bootstrap example in CI docs by
[@hverlin](https://github.com/hverlin) in
[#4351](#4351)
- Update link in comparison-to-asdf.md by
[@hverlin](https://github.com/hverlin) in
[#4401](#4401)

### 📦️ Dependency Updates

- update rust crate bzip2 to v0.5.1 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#4392](#4392)
- update rust crate built to v0.7.6 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#4391](#4391)

### Chore

- issue closer by [@jdx](https://github.com/jdx) in
[bee1f55](bee1f55)

### New Contributors

- @iamoeg made their first contribution in
[#4357](#4357)
- @hadronomy made their first contribution in
[#4356](#4356)
- @pietrodn made their first contribution in
[#4382](#4382)
- @genskyff made their first contribution in
[#4358](#4358)
- @kiwamizamurai made their first contribution in
[#4363](#4363)
- @rkben made their first contribution in
[#4387](#4387)
- @IxDay made their first contribution in
[#4396](#4396)
- @KevSlashNull made their first contribution in
[#4333](#4333)
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.

2 participants