Skip to content

Instantly share code, notes, and snippets.

@haslinger
Last active May 4, 2019 18:21
Show Gist options
  • Save haslinger/e3592d5af5f9fb0d57d1329bebe9346d to your computer and use it in GitHub Desktop.
Save haslinger/e3592d5af5f9fb0d57d1329bebe9346d to your computer and use it in GitHub Desktop.

Installation of Phoenix on Ubuntu 16.04

  • Don't use the Ubuntu packages provided, instead:
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
sudo apt-get install esl-erlang elixir
  • Install mix
mix local.hex
  • Install Node.js:
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get update
sudo apt-get install nodejs
  • Install Postgres:
sudo apt-get install postgresql postgresql-client
  • Set password für User postgres:
sudo -u postgres psql
\password postgres
...
\q
  • Install Phoenix:
mix archive.install https://github.com/phoenixframework/archives/raw/master/phoenix_new.ez

Setup a new Project

  • Create project:
mix phoenix.new projectname
cd projectname
  • Set Postgres password in config/dev.exs

  • Create the storage for the repo

mix ecto.create

Fix auto reload in Ubuntu

  • Install prerequesites
sudo apt-get install inotify-tools
  • Restart server

Tipps

in case of Cannot assign to read only property 'lastIndex' of object '[object RegExp]' change in package.json:

"brunch": "~2.8.2",

and run npm update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment