So, I am not really sure if this question belongs here, but as a newbie, I’ll assume a degree of latitude is allowed in my questions…
So before setting out to ask this question, I DID search for the answer to the same question posted about a year ago. People more commented on the question than actually answered the question. I can’t live with the ambiguity so early in my Elixir journey. So, regarding ASDF for Erlang and Elixir to work well together with OTP and eventually running Phoenix, what versions of Erlang and Elixir do I install? How do I match the version of erlang to the version of Elixir that will run the Phoenix version I will want to run?
Following above requirements, you can choose whatever you can get from ASDF. For now, maybe:
1.14.5-otp-25
1.15.0-otp-26
1.15.0-otp-25
…
If there is no explicit reason to use the latest version of Elixir and Erlang/OTP , I typically lean towards using versions that have been released for some time rather than the latest version.
For me, I will use 1.14.5-otp-25.
If you are reading a book
If you are reading books that have been published for some time, it is best not to follow the principle mentioned above. These books usually have version requirements stated at the beginning, so install the required version according to their requirements.
what versions of Erlang and Elixir do I install? For now, 1.15.0-otp-25Edit: If you want to have best experience, use 1.14.5-otp-25. If you want to try “bleeding new stable version”, use 1.15.0-otp-26, but you will experience some pain…(@w0rd-driven mentions the reason).
How do I match the version of erlang to the version of Elixir that will run the Phoenix version I will want to run? Check compatibility related docs (mentioned by @dimitarvp and @LostKobrakai):
Given how raw both OTP 26 and Elixir 1.15 are at the moment, I’d recommend 1.14 and OTP 25. For someone just starting out this is where you’ll have the least growing pains. ElixirLS support for both or primarily OTP 26 will drop soon but I’ve seen quirks for people running Elixir 1.15 on the Elixir Slack.
Livebook is also an excellent way to get your toes wet with Elixir and you can inspect the runtimes it gets bundled with. When Livebook moves to 1.15 and OTP 26, that’s the time I’d be more likely to jump personally but that’s not a perfect measurement. They would have solved for their dependencies but other dependencies may have their quirks.
All of the information by @c4710n is 100% spot on but from one fledgling to another, I want you to have the best experience possible. It’s better to stay away from the “bleeding edge” as 1.15 dropped days ago and OTP 26 recently introduced some much needed changes that are taking time to get ironed out across the ecosystem.
Eventually, this will become second nature but I don’t believe there is one resource tracking what I’ve mentioned. I also could very well be crying wolf but I wouldn’t recommend someone try bleeding edge Node runtimes or even the latest minor revision of PHP. They are just as stable (or some could argue less so) but there is a cadence that is not all that present as an outsider. No ecosystem has a perfect score here either.
In addition to already excellent answers, I strongly recommend you bookmark the following link, especially the " Compatibility between Elixir and Erlang/OTP" section:
Just wanted to get back here to report that I just started using rtx on a Mac and a Linux machine, zero issues so far, installed several versions of Erlang and Elixir and ran several past projects, everything is solid.
And yes it’s considerably faster. My Elixir programs are having less startup time and I love it.
asdf served me very well but for the moment I am retiring it from my machines unless I need it for something more niche, something that rtx can’t do. But no preliminary indications for that yet.