Elixir - Environment
In order to run Elixir, you need to set it up locally on your system.
To install Elixir, you will first require Erlang. On some platforms, Elixir packages come with Erlang in them.
Let us now understand the installation of Elixir in different Operating Systems.
To install Elixir on windows, download installer from https://repo.hex.pm/elixirwebsetup.exe and simply click Next to proceed through all steps. You will have it on your local system.
If you have any problems while installing it, you can check this page for more info.
If you have Homebrew installed, make sure that it is the latest version. For updating, use the following command −
Now, install Elixir using the command given below −
brew install elixir
The steps to install Elixir in an Ubuntu/Debian setup is as follows −
Add Erlang Solutions repo −
wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && sudo dpkg -i erlang-solutions_1.0_all.deb sudo apt-get update
Install the Erlang/OTP platform and all of its applications −
sudo apt-get install esl-erlang
Install Elixir −
sudo apt-get install elixir
Other Linux Distros
If you have any other Linux distribution, please visit this page to set up elixir on your local system.
Testing the Setup
To test the Elixir setup on your system, open your terminal and enter iex in it. It will open the interactive elixir shell like the following −
Erlang/OTP 19 [erts-8.0] [source-6dc93c1] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] Interactive Elixir (1.3.1) - press Ctrl+C to exit (type h() ENTER for help) iex(1)>
Elixir is now successfully set up on your system.