Open soltex1 opened 2 years ago
Manually downloading kerl as you are doing should not be necessary. Can you explain why you are doing that?
Also, overriding $HOME
as you are doing and not setting $ASDF_DIR
is likely causing the problem. I'd suggest not changing $HOME
unless necessary.
Moved to the elixir plugin as this doesn't seem to an issue with asdf core.
Manually downloading kerl as you are doing should not be necessary. Can you explain why you are doing that?
Also, overriding
$HOME
as you are doing and not setting$ASDF_DIR
is likely causing the problem. I'd suggest not changing$HOME
unless necessary.
I am manually downloading kerl because I had an error once where kerl wasn't found. I will remove that.
I really need to override $HOME
as it fixes an issue with elixir
.
I tried to set all these env vars ASDF_CONFIG_FILE
, ASDF_DATA_DIR
, and ASDF_DIR
as this:
export ASDF_CONFIG_FILE=~/.asdf
export ASDF_DATA_DIR=~/.asdf
export ASDF_DIR=~/.asdf
And now I am getting another error after I run mix: No version is set for command mix
.
What else should I try?
Did you verify elixir is installed with asdf current
? And if so, what does type -a mix
print?
Did you verify elixir is installed with
asdf current
? And if so, what doestype -a mix
print?
@Stratus3D Yes, elixir is installed, and type -a mix
returns mix is /root/.asdf/shims/mix
.
I have added these 2 lines (again) before running any mix command and after overriding the $HOME
and it worked:
asdf global erlang 21.3.2
asdf global elixir 1.8.1
@Stratus3D As soon as I override the HOME
env var, asdf
tries to find the .tool-versions
at HOME
instead of using the ASDF_DIR
. How do I change the .tool-versions
path?
I've the same problem, it's actually kind of interesting.
`mix is /Users/keremozdemir/.asdf/shims/mix ~ ❯ asdf info OS: Darwin 192.168.1.101 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:37 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6031 arm64
SHELL: fish, version 3.7.1
BASH VERSION: 3.2.57(1)-release
ASDF VERSION: v0.14.0-ccdd47d
ASDF INTERNAL VARIABLES: ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions ASDF_DATA_DIR=/Users/keremozdemir/.asdf ASDF_DIR=/Users/keremozdemir/.asdf ASDF_CONFIG_FILE=/Users/keremozdemir/.asdfrc
ASDF INSTALLED PLUGINS: elixir https://github.com/asdf-vm/asdf-elixir.git master a4c42e1 erlang https://github.com/asdf-vm/asdf-erlang.git master 8c5dacf nodejs https://github.com/asdf-vm/asdf-nodejs.git master c5b7c40
~ ❯ asdf list elixir 1.16.2 erlang 25.3.2.12 nodejs *18.20.2`
config.fish:
`set -x LANG en_US.UTF-8
set -x JAVA_HOME /Library/Java/JavaVirtualMachines/amazon-corretto-17.jdk/Contents/Home
set -gx GSAP_TOKEN "XXXXXXX"
set -gx CFLAGS "-O2 -g -fno-stack-check" set -gx KERL_CONFIGURE_OPTIONS "--disable-hipe --without-javac --enable-wx --with-wx-config=/opt/homebrew/bin//wx-config --with-ssl=$(brew --prefix openssl)" set -xU KERL_BUILD_DOCS yes set -xU KERL_INSTALL_HTMLDOCS yes set -xU KERL_INSTALL_MANPAGES yes
if status is-interactive
end
source ~/.iterm2_shell_integration.fish source ~/.asdf/asdf.fish
set -gx PNPM_HOME "/Users/keremozdemir/Library/pnpm" if not string match -q -- $PNPM_HOME $PATH set -gx PATH "$PNPM_HOME" $PATH end
Describe the Bug
I got an error
unknown command: mix. Perhaps you have to reshim?
after installing elixir and erlang, and runningmix
.I have added
asdf reshim
and the absolute path ofmix
(/home/user/.asdf/shims/mix
), and it didn't solve the issue.Steps to Reproduce
run the following shell script on ubuntu 18.04:
Expected Behaviour
be able to use mix without any errors
Actual Behaviour
I got an error:
unknown command: mix. Perhaps you have to reshim?
Environment
asdf plugins affected (if relevant)
elixir
anderlang