Setting up your environment for Elixir support
February 2, 2014 ยท View on GitHub
The only prerequisite for Elixir is Erlang, version R16B or later. Official precompiled packages are available for most platforms.
To check your installed erlang version:
$ erl
Erlang R16B (erts-5.10.1) ...
OSX
Install via homebrew
$ brew update
$ brew install erlang
$ brew install elixir
Linux
Fedora 17+ and Fedora Rawhide
$ sudo yum -y install elixir
Arch Linux (on AUR)
$ yaourt -S elixir
openSUSE (and SLES 11 SP3+)
- Add Erlang devel repo with zypper ar -f obs://devel:languages:erlang/ erlang
- Install Elixir:
$ zypper in elixir
Gentoo
$ emerge --ask dev-lang/elixir
Windows
Install Erlang (R16B02) from the official precompiled packages.
Direct Erlang installtion links
Install Elixir through Chocolatey
> cinst elixir
Test your setup
Elixir ships with three executables, iex, elixir, and elixirc.
Fire up iex to run the Elixir shell. In iex, or "Iteractive Elixir," we can
execute any valid Elixir expression and see the evaluated result.
Erlang R16B03 (erts-5.10.4) [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]
Interactive Elixir (0.12.2) - press Ctrl+C to exit (type h() ENTER for help)
$ iex
iex(1)> IO.puts "Sweet Elixir!"
Sweet Elixir!
:ok
iex(2)>