If you are on linux use ASDF https://github.com/asdf-vm/asdf
use asdf to install erlang
asdf plugin-add erlang asdf install erlang 21.1 asdf global erlang 21.1
mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez
Warning
|
Utiliser git bash (🦄) pas le cmd windows (💩) |
download and install https://download.docker.com/win/stable/Docker%20for%20Windows%20Installer.exe
Install elixir Msi https://repo.hex.pm/elixir-websetup.exe
run :
mix archive.install hex phx_new 1.4.0
The main problem about this issue on Windows Platform is seemingly coming from a proper maker. Which in the case is nmake coming along with Microsoft Visual Studio Build Tools (or Visual C++) Correction:
you can work with Chocolatey to get the adapted tools.
Chocolatey check this link [https://chocolatey.org/docs/installation] folllow steps for Installing Chocolatey chapter
Visual C++ Build Tools
choco install VisualCppBuildTools
(and follow steps). add C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin in your path
Install nodejs Msi https://nodejs.org/dist/v10.15.0/node-v10.15.0-x64.msi
I’ll present thing with VSCode
Install those plugin :
- vscode-elixir
- elixir snippets
mix new my_project
creates a project in myproject folder
mix phx.new my_phx_project
creates a phoenix project in myproject folder
and if postgres was running and listening on localhost
psql -h localhost -U postgres_user_change_me
let’s you connect to your database :D