Lawrence-2001
What versions of Erlang and Elixir are needed for Phoenix 1.4?
What versions of Erlang and Elixir are needed for Phoenix 1.4? I tried a lot of versions and never managed to run Phoenix 1.4. Errors appear when creating a database. There are different errors on different versions of Erlang and Elixir. I spent 2 days looking through versions and still couldn’t find the right ones. I tried changing the path variables for Erlang and Elixir, but it didn’t help.
mix ecto.create and mix phx.server never worked without errors. Although I have postgres, hex.. Although I have postgres, hex.
Marked As Solved
dimitarvp
I appreciate you giving a full list of safer dependency versions – good job.
I do still believe OP can just stick with Elixir 1.11 and fix his Postgres credentials problem and be done with the whole thing though.
But you are also right that he can do both: (1) specify the dependency versions like you instructed and (2) fix Postgres credentials.
Also Liked
josevalim
It is very hard to know without looking at the errors. Do the projects even compile fine?
In any case, latest v1.4 was release on April 2020 and the Elixir release at the time was v1.10. Compatible OTP versions can be found here: Compatibility and deprecations — Elixir v1.20.2
Eiji
If we want to find first working version then isn’t it easier to just take an elixir value in Phoenix.MixProject.project/0 function located in mix.exs? Following v1.4 branch the minimum Elixir version is 1.4, see:
https://github.com/phoenixframework/phoenix/blob/f8bb00bce84b4d14c7e4614010c1520005f092a9/mix.exs#L10-L10
If we want to be sure which combinations were tested we can simply check travis.yml which contains all supported Erlang and Elixir matrices:
https://github.com/phoenixframework/phoenix/blob/v1.4/.travis.yml#L2-L15
However we need to be careful with them as according to compatibility table:
- Elixir’s
1.4and1.5supportsErlangversion18, but it wasn’t tested inv1.4branch (it was tested in all1.1.x,1.2.xand1.3.xversions) Erlang/OTP 20wasn’t supported beforeElixir 1.4.5Erlang/OTP 21wasn’t supported beforeElixir 1.6.6
So the officially supported (tested in Travis CI) versions for Phoenix 1.4.x are:
Elixir 1.4.0 - 1.4.4withErlang/OTP 19.3 - 19.3.6.13Elixir 1.4.5withErlang/OTP 19.3 - 19.3.6.13Elixir 1.4.5withErlang/OTP 20.3 - 20.3.8.26Elixir 1.5.0 - 1.5.3withErlang/OTP 19.3 - 19.3.6.13Elixir 1.5.0 - 1.5.3withErlang/OTP 20.3 - 20.3.8.26Elixir 1.6.0 - 1.6.5withErlang/OTP 19.3 - 19.3.6.13Elixir 1.6.0 - 1.6.5withErlang/OTP 20.3 - 20.3.8.26Elixir 1.6.6withErlang/OTP 19.3 - 19.3.6.13Elixir 1.6.6withErlang/OTP 20.3 - 21.3.8.24
Note: The phx.new task as well as guides requires Elixir minimum version 1.5.0
Note: Didn’t included -rc.x releaes as they are release candidates, so they aren’t expected to be stable and therefore recommended for production
Note: Some guides mentions Elixir v1.7 (elixircasts) or Elixir v1.9 (hexdocs)
Helpful resources:
- [phoenixframework/phoenix@8dbb260] Remove old generators and require Elixir v1.4+
- [phoenixframework/phoenix@49def42] Require Elixir v1.5 for new apps
- [phoenixframework/phoenix@a56fdfb] Fix the Elixir minimum version on guide to 1.5
- [hexdocs.pm/phoenix v1.4.18] Installation guide
- [hexdocs.pm/phoenix v1.4.18] Deploying with Releases
- [elixircasts.io using Elixir 1.7] #75: Upgrading to Phoenix 1.4
Eiji
You need to downgrade dependencies in mix.exs as your current mix.exs tries to use the more recent ones. Those dependencies requires newer Elixir versions than phoenix v1.4.
Try to use those commands:
mix archive.install hex phx_new 1.4.18 --force
mix phx.new example
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









