Joey Yi Zhao
Joey Yi Zhao

Reputation: 42500

How to install elixir dev version on Mac

I use brew install elixir to install elixir on Mac. It works for the released version which is v1.5.2 at this moment. How can I install the dev version like Elixir >= 1.6.0-dev on Mac?

Upvotes: 3

Views: 934

Answers (2)

Dogbert
Dogbert

Reputation: 222158

Since you're already using Homebrew, the simplest way to install the latest dev version is to use --HEAD:

brew install elixir --HEAD

This will fetch the latest version from the git repo at https://github.com/elixir-lang/elixir.git and make and install that. You can see exactly what it does by reading its recipe using brew cat elixir.

Upvotes: 5

Mike Buhot
Mike Buhot

Reputation: 4885

  1. Use docker - you can mount your mix project into a docker container to run mix/iex. Here's a sample Dockerfile:

https://github.com/aabrook/elixir/blob/master/Dockerfile

FROM erlang:20
RUN git clone https://github.com/elixir-lang/elixir.git
RUN cd elixir && make clean compile
ENV PATH=/elixir/bin:$PATH
CMD ["iex"]
  1. Use a version manager such as kiex

kiex install master

Using kiex has the benefit of being able to jump to the source of std library functions when using the elixir-ls tool from vscode, see this blog post

Upvotes: 2

Related Questions