5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

mac+VSCodeでElixir実行環境を作る

Posted at

書籍『プログラミングElixir』に書かれたコードを実行できる環境を作ります。

Elixirをインストール

環境はmacOS BigSur バージョン11.3.1です。

https://elixir-lang.jp/install.html
インストールページからディストリビューションmacOS(Mac OS X)の項目に記載されたコマンドを実施します。

macだとhomebrewでインストールできます。かんたんですね。

#  Homebrew を最新バージョンにアップデート
$ brew update

#  インストール
$ brew install elixir

ちなみにアンインストール。

$ brew uninstall elixir

エディタ VSCodeをインストール

Download Now ボタンからダウンロードします。
ダウンロードしたzipファイルを解答、Visual Studio Code.appをアプリケーションディレクトリーに移動します。

エクステンションをインストール

開発に便利なエクステンションをインストール。
ブロックみたいなアイコンから必要なエクステンションを検索、インストールします。

スクリーンショット 2021-07-03 19.55.45.png

今回インストールしたエクステンション。

  • vscode-elixir(Elixirのシンタックスカラー、コードスニペット、オートコンプリート)
  • Thnder Client(REST API クライアント)
  • GitLens(VSCodeのGit機能強化)
  • Browser Preview(ブラウザ)

VSCodeでターミナルを開く

メニューバーのTerminalから開くか、Macなら Ctrl+Shift+@ でターミナルウィンドウが開きます。

スクリーンショット 2021-07-03 21.48.46.png

iexを起動する。

スクリーンショット 2021-07-03 21.59.01.png

これで最低限コードが実行できる環境ができました。
ターミナルはVSCodeでなくても、好みのターミナルを使うとよいと思います。

おつかれさまでしたー

5
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?