Lawrence-2001

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

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

josevalim

Creator of Elixir

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

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:

  1. Elixir’s 1.4 and 1.5 supports Erlang version 18, but it wasn’t tested in v1.4 branch (it was tested in all 1.1.x, 1.2.x and 1.3.x versions)
  2. Erlang/OTP 20 wasn’t supported before Elixir 1.4.5
  3. Erlang/OTP 21 wasn’t supported before Elixir 1.6.6

So the officially supported (tested in Travis CI) versions for Phoenix 1.4.x are:

  1. Elixir 1.4.0 - 1.4.4 with Erlang/OTP 19.3 - 19.3.6.13
  2. Elixir 1.4.5 with Erlang/OTP 19.3 - 19.3.6.13
  3. Elixir 1.4.5 with Erlang/OTP 20.3 - 20.3.8.26
  4. Elixir 1.5.0 - 1.5.3 with Erlang/OTP 19.3 - 19.3.6.13
  5. Elixir 1.5.0 - 1.5.3 with Erlang/OTP 20.3 - 20.3.8.26
  6. Elixir 1.6.0 - 1.6.5 with Erlang/OTP 19.3 - 19.3.6.13
  7. Elixir 1.6.0 - 1.6.5 withErlang/OTP 20.3 - 20.3.8.26
  8. Elixir 1.6.6 with Erlang/OTP 19.3 - 19.3.6.13
  9. Elixir 1.6.6 with Erlang/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:

  1. [phoenixframework/phoenix@8dbb260] Remove old generators and require Elixir v1.4+
  2. [phoenixframework/phoenix@49def42] Require Elixir v1.5 for new apps
  3. [phoenixframework/phoenix@a56fdfb] Fix the Elixir minimum version on guide to 1.5
  4. [hexdocs.pm/phoenix v1.4.18] Installation guide
  5. [hexdocs.pm/phoenix v1.4.18] Deploying with Releases
  6. [elixircasts.io using Elixir 1.7] #75: Upgrading to Phoenix 1.4
Eiji

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

Where Next?

Popular in Questions Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
JulienCorb
I am trying to implement my new.html.eex file to create new posts on my website. new.html.eex: <h1>Create Post</h1> <%= ...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
jaysoifer
Is there a way to rollback a specific migration and only that one (“skipping” all the other ones)? Would mix ecto.rollback -v 200809061...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New

Other popular topics Top

danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29603 241
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

We're in Beta

About us Mission Statement