Skip to content

Instantly share code, notes, and snippets.

@Yoosuke
Last active February 27, 2019 02:35
Show Gist options
  • Save Yoosuke/a5722b74711a94137856333b5061baf5 to your computer and use it in GitHub Desktop.
Save Yoosuke/a5722b74711a94137856333b5061baf5 to your computer and use it in GitHub Desktop.

Install : Windows編

エディタのインストール Visual Staduio Code

https://code.visualstudio.com/
https://marketplace.visualstudio.com/items?itemName=mjmcloug.vscode-elixir

Gitのインストール

Git https://gitforwindows.org/

PostgreSQL

PostgreSQL Windows x86-64のPostgreSQL Version 10.7をインストールする https://www.enterprisedb.com/downloads/postgres-postgresql-downloads

インストール中にパスワードの入力を求められるので、以下をコピーして貼り付けてください。

postgres

locationを聞かれたらjapan/japaneseを選択する

最後にFinishを押すと、スタックビルダが起動するので、

スタックビルダが出てきたら、キャンセルを選択する

node.jsのインストール

https://nodejs.org/ja/download/

Firefoxのインストール

https://www.mozilla.org/ja/firefox/new/

FirefoxのRestClientのAdd-onをインストール

https://addons.mozilla.org/ja/firefox/addon/restclient/versions/

Elixirをインストール

https://elixir-lang.org/

スタートメニュー横にある検索から以下を入力して探す

dos

コマンドプロンプトと表示されたものを起動する

Phoenixframeworkをインストール

https://hexdocs.pm/phoenix/installation.html

先ほど、開いた、コマンドプロンプト上に以下をコピーして貼り付けてください。 mix local.hex YかNかを問われるので、yを入力する(コマンドプロンプトのカーソルが点滅している箇所でyを打って、Enter) Y

Elixirが無事にインストールされている事を以下のコマンドを入力して確かめる elixir -v

以下のようにバージョンが表示されていればOK

Erlang/OTP 20 [erts-9.3] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10]

Elixir 1.8.1 (compiled with Erlang/OTP 20)

nodeが無事にインストールされている事を確認する node -v

Phoenixframeworkをインストール次のコマンドをコマンドプロンプトにコピーして貼り付けてください。

mix archive.install hex phx_new 1.4.1

貼り付けたら、Enterを入力

を入力

インストールが全て完了したので、起動確認

mix phx.new hello

y

以下が表示されたら

We are almost there! The following steps are missing:

    $ cd hello

Then configure your database in config/dev.exs and run:

    $ mix ecto.create

Start your Phoenix app with:

    $ mix phx.server

You can also run your app inside IEx (Interactive Elixir) as:

    $ iex -S mix phx.server

表示されたコマンドを順にコマンドで打っていく

cd hello

mix ecto.create

mix phx.server

ブラウザで以下のURLを入力する localhost:4000

サーバーをシャットダウンさせるには、コマンドプロンプト上で、Ctr + Cをおして、qコマンドを入力する。

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