2025-03-05elixir
Managing Elixir Installs with asdf
# install asdf
brew install asdf
# set PATH (add this to .zshrc), other shells have other instructions
export PATH="${ASDF_DATA_DIR:-$HOME/.asdf}/shims:$PATH"
# or, if you haven't set an ASDF_DATA_DIR
export PATH="${$HOME/.asdf}/shims:$PATH"
# add, list, install erlang
asdf plugin add erlang https://github.com/asdf-vm/asdf-erlang.git
asdf list erlang
KERL_BUILD_DOCS=yes asdf install erlang $ERLANG_VERSION
# add, list, install elixir
asdf plugin add elixir https://github.com/asdf-vm/asdf-elixir.git
asdf list elixir
asdf install elixir $ELIXIR_VERSION
# set versions in a .tool_versions
asdf set erlang $ERLANG_VERSION
asdf set elixir $ELIXIR_VERSION
# check version
elixir --version
I'm not very good at keeping my tools up to date. Everytime something breaks I tend to start fresh. It's (mostly) easy with asdf.