So you borked the Elixir installation on your Windows machine. Same. Hopefully I can save you some trouble.
About 1.5 years ago, I was fresh out of dev school and managed to install Elixir on my PC without a package manager. Which is all fine and dandy until one needs to update it. Surely I could just follow the Erlang/Elixir Windows web installer instructions and I’ll be on my way, right? WRONG. Oh, so very wrong.
I was met with the dreaded crash dump:
{"init terminating in do_boot",{'cannot get bootfile','C:\\Program Files\\erl-24.1.7/bin/start.boot'}} init terminating in do_boot ({cannot get bootfile,C:\Program Files\erl-24.1.7/bin/start.boot})
Crash dump is being written to: erl_crash.dump...done.
Here’s how I fixed it:
- Remove every existing trace of Erlang and Elixir installations from your PC. This might take some doing, depending on how creative your previous install was, but ya gotta do it. We want a clean slate here, people.
- Verify Erlang has been removed by running
erl
in your terminal. - Verify Elixir has been removed by running
iex
in your terminal.- In both cases, if your terminal returns something along the lines of “
command not found
”, you’re golden. - If your terminal still crashes, or tries to look for old files, you have more clean up to do.
- In both cases, if your terminal returns something along the lines of “
- Verify Erlang has been removed by running
- Choose and install a Windows software manager.
- I chose Chocolatey since I’ll only be using this machine for side projects and am content with sticking to their latest available software versions.
- Install Erlang with Chocolatey first. This is important because Elixir runs on the Erlang VM, which is also another reason why we’re not using the aforementioned web installer.
- Test that the first installation was successful by running
erl
in your terminal.- If the Eshell starts, your install was successful.
- Test that the first installation was successful by running
- Install Elixir with Chocolatey second.
- Your terminal will return a directory where the Elixir commands were installed.
- Mine was: C:\ProgramData\chocolatey\lib\Elixir\tools\bin
- Your terminal will return a directory where the Elixir commands were installed.
- Add that directory to your PATH.
- Test that the second installation was successful by running
iex
in your terminal.- If the Interactive Elixir shell starts, you’ve made it, congratulations. 🎉
Happy hacking!
Top comments (0)