asdf
asdf copied to clipboard
asdf reshim doesn't always pick up all versions
Describe the bug
I am a frequent user of the Parity gem (https://github.com/thoughtbot/parity). The shims for these ruby commands don't seem to pick up newer versions of Ruby any longer. When running then, I get an error about the version not being included.
An example is below for the command "development":
#!/usr/bin/env bash
# asdf-plugin: ruby 2.5.8
exec /Users/home/.asdf/bin/../bin/asdf exec "development" "$@"
If I add a line # asdf-plugin: ruby 2.7.2
it works perfectly.
#!/usr/bin/env bash
# asdf-plugin: ruby 2.7.2
# asdf-plugin: ruby 2.5.8
exec /Users/home/.asdf/bin/../bin/asdf exec "development" "$@"
I've nuked the shims directory completely multiple times, trying to use reshim to generate new shims. This issue started a while back, and I've always just manually edited the shim file to include the proper version.
I also posted this issue @ asdf-ruby, but after reviewing the code, reshim is handled by core, so I'm "upstreaming" this here. https://github.com/asdf-vm/asdf-ruby/issues/201
To Reproduce
Reshim asdf
Expected behavior
ASDF should have a line for every version of ruby with the gem available.
Actual behavior
Shims are created for the without the latest version.
Environment
local .tool-version
ruby 2.7.2
nodejs 15.3.0
yarn 1.22.10
python 3.9.0
global .tool-version
postgres 11.6
nodejs 13.14.0
ruby 2.7.2
python 3.8.5
flutter 1.17.0-stable
jq 1.6
yarn 1.22.4
OS:
Darwin promad-alpha.local 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64
SHELL:
zsh 5.8 (x86_64-apple-darwin20.0)
ASDF VERSION:
v0.8.0-c6145d0
ASDF ENVIRONMENT VARIABLES:
ASDF_DIR=/Users/***/.asdf
ASDF INSTALLED PLUGINS:
nodejs https://github.com/asdf-vm/asdf-nodejs.git
postgres https://github.com/smashedtoatoms/asdf-postgres.git
python https://github.com/danhper/asdf-python.git
ruby https://github.com/asdf-vm/asdf-ruby.git
yarn https://github.com/twuni/asdf-yarn.git
asdf plugins affected (if relevant):
asdf-ruby