This document describes practices that are suitable for all projects.
postgres. This is the default for most Phoenix projects.
All of these steps are optional, but recommended.
Most Elixir projects need PostgreSQL. See: PostgreSQL setup
You need Asdf version manager to install Erlang, Elixir, and Node.js. See: asdf setup
For Ubuntu and other Debian distributions, install the following to properly get Erlang via asdf:
sudo apt-get install build-essential # C Compilers sudo apt-get install libncurses5-dev libncursesw5-dev # Required header for Erlang source sudo apt-get install libssl-dev # Required header for Erlang source as well sudo apt-get install unzip # asdf's preferred utility to unpack Erlang
For fresh macOS installations, install the following to properly get Erlang via asdf:
# This is weird. I don't know why it's needed, but it is. -Rico brew cask install java brew install openssl
To configure "global" versions in asdf, create
~/.tool-versions. Here's a fair starting point.
# These are stable versions as of April 2017. # To check newer versions, use: `asdf list-all nodejs` cd ~ echo 'erlang 19.3' >> .tool-versions echo 'nodejs 8.5.0' >> .tool-versions echo 'elixir 1.5.1' >> .tool-versions asdf install
Take note that nodejs installations via asdf-VM require gpg auth before doing asdf install. For more information, check here
There are other ways to acquire Postgres and Elixir: