You can install different versions of the Elixir with help of Kiex, like in Ruby with a RVM and Rbenv.
Download and install Kiex
\curl -sSL https://raw.githubusercontent.com/taylor/kiex/master/install | bash -s
bash
In .bashrc (or .zshrc if you use z shell), add the following
[[ -s "$HOME/.kiex/scripts/kiex" ]] && source "$HOME/.kiex/scripts/kiex"
bash
Install required Elixir
kiex install 1.7 # or another version
bash
And then you can use any version
kiex use 1.7
bash
Top comments (3)
Hi, thanks for your note. I wand to advise asdf. It works the same, but can also change version of erlang.
Yeah I've heard a lot about asdf and also heard people recommend it a lot.
Does it take a long time to set-up and switch?
I removed my package installed Elixir and Erlang and replaced with asdf and then asdf installed Erlang and Elixir in under an hour including, trying out multiple versions for projects that required older versions of Elixir.