asdf-crystal
asdf-crystal copied to clipboard
Unable to run shards command
$ shards
No such command in 0.25.0 of crystal
Same happens with v0.24.2, but with 0.25.0 it's a blocker, because crystal deps
command was removed.
I downloaded, compiled & installed the Shards program manually. Should not be included?
I downloaded, compiled & installed the Shards program manually. Should not be included?
asdf create shims based on that file: bin/list-bin-paths
Have you already tried to reshim? asdf reshim crystal
or If this didn't work, what's the output of the command: crystal env
and which version of asdf you are using?
Tried reshim command. Didn't work. env command output:
$ crystal env CRYSTAL_CACHE_DIR="/home/megatux/.cache/crystal" CRYSTAL_PATH="lib:/home/megatux/.asdf/installs/crystal/0.24.2/src:/home/megatux/.asdf/installs/crystal/0.24.2/share/crystal/src" CRYSTAL_VERSION="0.24.2"
Same with new Crystal 0.26.0. After reshim
no luck, but checking crystal env
output I found the binary inside the bin/ directory. That worked.
$ crystal env
CRYSTAL_CACHE_DIR="/home/megatux/.cache/crystal"
CRYSTAL_PATH="lib:/home/megatux/.asdf/installs/crystal/0.26.0/src:/home/megatux/.asdf/installs/crystal/0.26.0/share/crystal/src"
CRYSTAL_VERSION="0.26.0"
$HOME/.asdf/installs/crystal/0.26.0/bin/shards
Same issue here with Crystal 0.27.0.
I fixed it locally with the following change in ~/.asdf/plugins/crystal/bin/list-bin-paths
:
$ git diff
diff --git a/bin/list-bin-paths b/bin/list-bin-paths
index 714c1e9..0411349 100755
--- a/bin/list-bin-paths
+++ b/bin/list-bin-paths
@@ -1,3 +1,3 @@
#!/usr/bin/env bash
# let asdf create shims for installed scripts
-echo bin embedded/bin
+echo bin lib/crystal/bin
Then i called asdf reshim crystal
once more.
Hope this helps!
Related issue: https://github.com/crystal-lang/crystal/issues/5994
This is an upstream issue.