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

Unable to run shards command #14

Open
megatux opened this issue Jun 20, 2018 · 8 comments
Open

Unable to run shards command #14

megatux opened this issue Jun 20, 2018 · 8 comments

Comments

@megatux
Copy link

megatux commented Jun 20, 2018

$ shards
No such command in 0.25.0 of crystal
@megatux
Copy link
Author

megatux commented Jun 21, 2018

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

@megatux
Copy link
Author

megatux commented Jun 21, 2018

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

@marciogm
Copy link
Collaborator

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?

@megatux
Copy link
Author

megatux commented Jun 21, 2018

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
Copy link
Author

megatux commented Aug 14, 2018

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

@glenux
Copy link

glenux commented Jan 6, 2019

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!

@smorimoto
Copy link
Member

Related issue: crystal-lang/crystal#5994

@smorimoto
Copy link
Member

This is an upstream issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants