Elixir Version

This book targets Elixir 1.20 running on Erlang/OTP 28. At the time of writing, Elixir 1.20 is still in release-candidate status, so you will see 1.20.0-rc.4 (or a later RC) instead of a plain 1.20.0 on your machine. Check the version with:

$ elixir -v
Erlang/OTP 28 [erts-16.2.2] [source] [64-bit] [...]

Elixir 1.20.0-rc.4 (compiled with Erlang/OTP 28)

If the version you see is older, the vast majority of the examples will still work. Only a few newer features (noted in the text) require 1.20.

Installing Elixir and Erlang

You need two things on your machine: Erlang/OTP (the runtime) and Elixir (the language that runs on it). The easiest way to install both and keep them updated is a version manager. We recommend mise because it is fast and drops a project-local .tool-versions file so every example in this book pins to the exact versions it was tested against:

# install mise (macOS Homebrew example)
$ brew install mise

# then, from the directory of a project
$ mise use erlang@28.3.3 elixir@1.20.0-rc.4-otp-28
$ mise install

asdf works the same way and uses the same .tool-versions format, so pick whichever fits your workflow.