You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure it is exactly a bug, feel free to requalify as a feature request.
When using zsh (with the default configuration on macOS), installing commands that "conflicts" with the OS installed ones such as ruby which is installed in /usr/bin/ruby or rails in /usr/bin/rails, zsh does not respect $PATH and do not use the shims.
...
-> make -j 4
-> make install
==> Installed ruby-3.4.1 to ~/.asdf/installs/ruby/3.4.1
# `which` is right
% which ruby
=>~/.asdf/shims/ruby
# but `ruby` is wrong
% ruby --version
=> ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin24]
# `type` is also wrong
% type -f ruby
ruby is /usr/bin/ruby
# rehash fixes this
% rehash
% type -f ruby
=> ruby is ~/.asdf/shims/ruby
Steps to Reproduce
Get a fresh macOS install (I used UTM for this)
Use to xcode-select --install install Xcode Tools
Use git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.15.0 to install asdf
Use . "$HOME/.asdf/asdf.sh" to source the asdf script
Use /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" to install Homebrew
Source the Homebrew environment script as instructed.
Use brew install openssl@3 readline libyaml gmp autoconf rust to install Ruby dependences
Use asdf plugin add ruby https://github.com/asdf-vm/asdf-ruby.git to Install ruby plugin
Use sdf install ruby latest to install latest ruby
Use asdf global ruby latest to configure ruby globally
Use ruby --version to check the version
Expected Behaviour
The ruby version in the output should match the one installed by asdf if it is technically possible. If not asdf should detect the issue (conflicting binary in path and zsh shell) after creating a shim and output some warning to the user instructing them to rehash.
Actual Behaviour
It matches the system provided one.
Environment
macOS 15.2 (Fresh install in UTM)
OS:
Darwin rails-sessions.local 24.2.0 Darwin Kernel Version 24.2.0: Fri Dec 6 18:57:59 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_VMAPPLE arm64
SHELL:
zsh 5.9 (arm64-apple-darwin24.0)
BASH VERSION:
3.2.57(1)-release
ASDF VERSION:
v0.15.0-31e8c93
ASDF INTERNAL VARIABLES:
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=/Users/rails-sessions/.asdf
ASDF_DIR=/Users/rails-sessions/.asdf
ASDF_CONFIG_FILE=/Users/rails-sessions/.asdfrc
ASDF INSTALLED PLUGINS:
nodejs https://github.com/asdf-vm/asdf-nodejs.git master 93bd217
ruby https://github.com/asdf-vm/asdf-ruby.git master a76d00b
asdf plugins affected (if relevant)
No response
The text was updated successfully, but these errors were encountered:
ybart
changed the title
bug:
bug: asdf does not warn a binary conflicts with newly installed shim and the shell cache has to be refreshed
Jan 27, 2025
ybart
changed the title
bug: asdf does not warn a binary conflicts with newly installed shim and the shell cache has to be refreshed
bug: asdf fails to warn on binary conflicts after shim Install (because a shell rehash is required)
Jan 27, 2025
ybart
changed the title
bug: asdf fails to warn on binary conflicts after shim Install (because a shell rehash is required)
bug: asdf fails to warn on binary conflicts after shim install (because a shell rehash is required)
Jan 27, 2025
ybart
changed the title
bug: asdf fails to warn on binary conflicts after shim install (because a shell rehash is required)
bug: asdf do not warn on binary conflicts after shim install (because a shell rehash is required)
Jan 28, 2025
Describe the Bug
Not sure it is exactly a bug, feel free to requalify as a feature request.
When using zsh (with the default configuration on macOS), installing commands that "conflicts" with the OS installed ones such as
ruby
which is installed in/usr/bin/ruby
orrails
in/usr/bin/rails
, zsh does not respect $PATH and do not use the shims.Steps to Reproduce
xcode-select --install
install Xcode Toolsgit clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.15.0
to install asdf. "$HOME/.asdf/asdf.sh"
to source the asdf script/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
to install Homebrewbrew install openssl@3 readline libyaml gmp autoconf rust
to install Ruby dependencesasdf plugin add ruby https://github.com/asdf-vm/asdf-ruby.git
to Install ruby pluginsdf install ruby latest
to install latest rubyasdf global ruby latest
to configure ruby globallyruby --version
to check the versionExpected Behaviour
The ruby version in the output should match the one installed by
asdf
if it is technically possible. If notasdf
should detect the issue (conflicting binary in path and zsh shell) after creating a shim and output some warning to the user instructing them to rehash.Actual Behaviour
It matches the system provided one.
Environment
asdf plugins affected (if relevant)
No response
The text was updated successfully, but these errors were encountered: