Fl4m3Ph03n1x
How to have latest version of Elixir in Windows
Background
I am on a Windows machine and I am looking to install the latest version of elixir in it. This is being harder than expected.
Research
Initially I searched for something similar to asdf for Windows, but there is nothing similar for this platform. Scoop is the tool that comes closest, but it requires me to do custom scripts and to learn another tool, both things I am not a fan of right now:
Then I turned to chocolatey:
Which looks perfect, but it is severely outdated, being only in version 11.X
No signal of any updates to come, so this one is out as well.
My last hope, is perhaps Docker …
It looks like there is a version of 12.X, which hopefully uses OTP 24 (my goal):
https://github.com/erlef/docker-elixir/blob/a7a9a8ecd02b6e31e93cfa13d8c18de0328f6e1a/1.12/Dockerfile
Questions
However, I am not convinced yet. My only experiences with Docker containers were brutally painful. I understand things have changed in the meantime and that Docker seem to be a solution most developers fight for.
However, I am not sure if investing in this tool (remember, I discarded scoop because I didn’t want to invest in it) is going to pay off:
- Will I be able to create releases for Windows using a container?
- Will I be able to create releases for Ubuntu as well? (I am fairly sure I won’t be able to because my host is Windows, but just confirming)
- Do you guys recommend any guides for Windows?
Alternatives
I feel like I am reaching for the bottom of the barrel here. I am honestly running out of options. Any ideas would be welcome.
Marked As Solved
Fl4m3Ph03n1x
Answer
This one was not easy. I had to wait for the Windows binaries to be ready.
The only way of getting the cutting edge release is to compile it myself.
Step 1
However, if this is something you can’t do, to have the latest Erlang/OTP
versions you have to go here:
Here I downloaded Erlang/OTP 24.
Step 2
After that, I downloaded the official version of Elixir for Windows, and configured it to use my already installed version of Erlang/OTP (which it does by default):
Step 3 (Optional)
The final step, if you want to have a desktop app with Elixir, is to download the WebView support for Edge:
Done !
Also Liked
webuhu
I myself use a custom scoop bucket, but what it does can simple be done without it.
- Choose your disired precompiled elixir version from https://repo.hex.pm/builds/elixir/builds.txt
- Download from e.g. https://repo.hex.pm/builds/elixir/v1.12.3-otp-24.zip
- Extract and set the
binfolder to your windows path
Edit:
Of course you have to take care of the runtime Erlang version installation separately.
No, creating a release on native Windows for Ubuntu won’t work.
But creating a release for Windows within a Docker container won’t work ether in my view.
IloSophiep
I don’t feel qualified answering all of your questions, but for this one: Using a tool like Docker Desktop you can run both windows images and unix images on a Windows host. As far as I know you cannot manage them at the same time but I frequently switch between “using windows containers” and “using Linux containers” depending on my current needs
LostKobrakai
While the installer may not be that flexible you can always compile from source: Windows · elixir-lang/elixir Wiki · GitHub
The installer is just a convenience to hide the complexities involved for windows users and the (pre-)build versions only support the lowest supported otp version.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









