DEV Community

Dmitry Voronov for JetRockets

Posted on • Updated on • Originally published at jetrockets.pro

Manage Elixir versions like RVM & Rbenv

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
Enter fullscreen mode Exit fullscreen mode


bash

In .bashrc (or .zshrc if you use z shell), add the following

[[ -s "$HOME/.kiex/scripts/kiex" ]] && source "$HOME/.kiex/scripts/kiex"
Enter fullscreen mode Exit fullscreen mode


bash

Install required Elixir

kiex install 1.7 # or another version
Enter fullscreen mode Exit fullscreen mode


bash

And then you can use any version

kiex use 1.7
Enter fullscreen mode Exit fullscreen mode


bash

Top comments (3)

Collapse
 
denniskh profile image
Dennis Kharchuk

Hi, thanks for your note. I wand to advise asdf. It works the same, but can also change version of erlang.

Collapse
 
edisonywh profile image
Edison Yap

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?

Collapse
 
mgnshawn profile image
Shawn

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.