asdf-crystal icon indicating copy to clipboard operation
asdf-crystal copied to clipboard

Unable to run shards command

Open megatux opened this issue 6 years ago • 8 comments

$ shards
No such command in 0.25.0 of crystal

megatux avatar Jun 20 '18 03:06 megatux

Same happens with v0.24.2, but with 0.25.0 it's a blocker, because crystal deps command was removed.

megatux avatar Jun 21 '18 02:06 megatux

I downloaded, compiled & installed the Shards program manually. Should not be included?

megatux avatar Jun 21 '18 03:06 megatux

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?

marciogm avatar Jun 21 '18 03:06 marciogm

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"

megatux avatar Jun 21 '18 12:06 megatux

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

megatux avatar Aug 14 '18 21:08 megatux

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!

glenux avatar Jan 06 '19 18:01 glenux

Related issue: https://github.com/crystal-lang/crystal/issues/5994

smorimoto avatar Jan 26 '20 04:01 smorimoto

This is an upstream issue.

smorimoto avatar Jan 26 '20 04:01 smorimoto