I use asdf to install Erlang and then Elixir.
asdf install elixir 1.14.0-rc.1-otp-25
This results in:
asdf install elixir 1.14.0-rc.1-otp-25
And then ...
$ elixir
No version is set for command elixir
Consider adding one of the following versions in your config file at
elixir 1.14.0-rc.1-otp-25
$ |
Which config file is this referring to?
TLDR:
asdf install elixir latestasdf global elixir latestOr in your specific case: asdf global elixir 1.14.0-rc.1-otp-25
See the Set a Version section of the asdf docs:
6. Set a Version
asdfperforms a version lookup of a tool in all.tool-versionsfiles from the current working directory up to the$HOMEdirectory. The lookup occurs just-in-time when you execute a tool thatasdfmanages.::: warning Without a version listed for a tool execution of the tool will error.
asdf currentwill show you the tool & version resolution, or absence of, from your current directory so you can observe which tools will fail to execute. :::Global
Global defaults are managed in
$HOME/.tool-versions. Set a global version with:
asdf global nodejs latest
$HOME/.tool-versionswill then look like:
nodejs 16.5.0Some OSs already have tools installed that are managed by the system and not
asdf,pythonis a common example. You need to tellasdfto pass the management back to the system. The Versions reference section will guide you.Local
Local versions are defined in the
$PWD/.tool-versionsfile (your current working directory). Usually, this will be the Git repository for a project. When in your desired directory execute:
asdf local nodejs latest
$PWD/.tool-versionswill then look like:
nodejs 16.5.0Using Existing Tool Version Files
asdfsupports the migration from existing version files from other version managers. Eg:.ruby-versionfor the case ofrbenv. This is supported on a per-plugin basis.
asdf-nodejssupports this via both.nvmrcand.node-versionfiles. To enable this, add the following to yourasdfconfiguration file$HOME/.asdfrc:
legacy_version_file = yesSee the configuration reference page for more config options.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With