0

I'm trying to upgrade Elixir on Mac OSX. Homebrew shows that I've upgraded successfully. But when I run elixir --version, I get the old version??

Is there an extra step I need to do to set the upgraded version to the default?

Here's the relevant terminal messages...

22:~ 22$ elixir --version
Erlang/OTP 19 [erts-8.2] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]

Elixir 1.3.4
22:~ 22$ brew update

Updated 1 tap (homebrew/core).
==> New Formulae
guile@2.0
==> Updated Formulae
bazel@0.2    folly        harfbuzz     libgosu      scalaenv     terragrunt
22:~ 22$ 
22:~ 22$ brew upgrade elixir
Error: elixir 1.4.2 already installed
22:~ 22$ elixir --version
Erlang/OTP 19 [erts-8.2] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]

Elixir 1.3.4
22:~ 22$ 
Emily
  • 2,129
  • 3
  • 18
  • 43

2 Answers2

3

Check whether the version is already installed (but not activated)

$ brew info elixir

If you get multiple versions then:

$ brew switch elixir 1.4.2

If this not working, check the other ways mentioned here

Community
  • 1
  • 1
Eslam Hamouda
  • 1,141
  • 9
  • 13
1

I don't bother with brew for elixir since the build form source is so dead simple. I do use brew for erlang.

get clone https://github.com/elixir-lang/elixir.git
cd elixir
git checkout v1.4.2
make clean && make && sudo make install

The make clean is not necessary on the first build, but is needed when you change versions.

When your ready to update to a later version

git fetch origin
git checkout <new-tag>
make clean && make && sudo make install

Has not failed me yet.

Steve Pallen
  • 4,417
  • 16
  • 33