How to force Brew to install Elixir 1.9 in Mac

deployment
#1

I’m trying to upgrade Elixir to 1.9 in my Mac but after running:

  1. brew update
  2. brew upgrade elixir
    I still get Elixir 1.8.2
    What’s the simplest way of forcing the upgrade?
#2

1.8.2 is the latest version in homebrew.

1.9 is still a release candidate, only when it becomes stable, homebrew will list this version.

You could in the meantime use asdf instead of homebrew, or compile from source.

5 Likes
#3

+1 for using asdf.

I can recommend switching to it for all your interpreter needs (Elixir, Ruby, Python, etc). It makes project development a whole lot easier, especially when you use asdf local along with something like direnv.

2 Likes
#4

In practice it might require some extra work. My editors didn’t work with asdf elixir and ruby out of the box (execute tests for example). I just gave up and went back to brew. But I want to revisit it in future. I like the asdf concept.

#5

It does take a little extra work to get editors to point to the right binary, I’ll admit, but sometimes that’s as simple as calling ~/.asdf/shims/{name} or sourcing your .bashrc/.zshrc file before calling mix (for example).