Skip to content

Instantly share code, notes, and snippets.

@chandankumar4
Forked from haslinger/Phoenix on Ubuntu.md
Created August 12, 2018 15:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chandankumar4/70a495ca10e96c357787d556523799cb to your computer and use it in GitHub Desktop.
Save chandankumar4/70a495ca10e96c357787d556523799cb 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