lc0815

lc0815

Phoenix 1.6 install error: (UndefinedFunctionError) function :ranch_app.start/2 is undefined

hello there,
this is a frustrated sort of newbe with about a year in phoenix dev.

I just installed phoenix v1.6 with elixir 1.13 and created a new app, so when I run iex -S mix phx.server, this is what I get from the terminal session:

Elixir version
--------------

Elixir 1.13.4 (compiled with Erlang/OTP 22)

Phoenix version
---------------

Phoenix installer v1.6.11
Erlang/OTP 24 [erts-12.3.2.2] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [jit]

Application startup error
-------------------------

iex -S mix phx.server
[notice] Application ranch exited: exited in: :ranch_app.start(:normal, [])
    ** (EXIT) an exception was raised:
        ** (UndefinedFunctionError) function :ranch_app.start/2 is undefined (module :ranch_app is not available)
            (ranch 1.8.0) :ranch_app.start(:normal, [])
            (kernel 8.3.2) application_master.erl:293: :application_master.start_it_old/4
[notice] Application cowlib exited: :stopped
[notice] Application gettext exited: :stopped
[notice] Application telemetry_poller exited: :stopped
[notice] Application swoosh exited: :stopped
[notice] Application jason exited: :stopped
[notice] Application xmerl exited: :stopped
[notice] Application esbuild exited: :stopped
[notice] Application castore exited: :stopped
[notice] Application phoenix_live_dashboard exited: :stopped
[notice] Application telemetry_metrics exited: :stopped
[notice] Application phoenix_live_view exited: :stopped
[notice] Application phoenix_live_reload exited: :stopped
[notice] Application file_system exited: :stopped
[notice] Application phoenix_html exited: :stopped
[notice] Application postgrex exited: :stopped
[notice] Application ecto_sql exited: :stopped
[notice] Application db_connection exited: :stopped
[notice] Application connection exited: :stopped
[notice] Application phoenix_ecto exited: :stopped
[notice] Application ecto exited: :stopped
[notice] Application decimal exited: :stopped
[notice] Application phoenix exited: :stopped
[notice] Application phoenix_view exited: :stopped
[notice] Application phoenix_pubsub exited: :stopped
[notice] Application plug exited: :stopped
[notice] Application telemetry exited: :stopped
[notice] Application plug_crypto exited: :stopped
[notice] Application mime exited: :stopped
[notice] Application eex exited: :stopped
[notice] Application runtime_tools exited: :stopped


warning: the :gettext compiler is no longer required in your mix.exs.

Please find the following line in your mix.exs and remove the :gettext entry:

    compilers: [..., :gettext, ...] ++ Mix.compilers(),

  (gettext 0.20.0) lib/mix/tasks/compile.gettext.ex:5: Mix.Tasks.Compile.Gettext.run/1
  (mix 1.13.4) lib/mix/task.ex:397: anonymous fn/3 in Mix.Task.run_task/3
  (mix 1.13.4) lib/mix/tasks/compile.all.ex:92: Mix.Tasks.Compile.All.run_compiler/2
  (mix 1.13.4) lib/mix/tasks/compile.all.ex:72: Mix.Tasks.Compile.All.compile/4
  (mix 1.13.4) lib/mix/tasks/compile.all.ex:59: Mix.Tasks.Compile.All.with_logger_app/2
  (mix 1.13.4) lib/mix/tasks/compile.all.ex:36: Mix.Tasks.Compile.All.run/1

** (Mix) Could not start application ranch: exited in: :ranch_app.start(:normal, [])
    ** (EXIT) an exception was raised:
        ** (UndefinedFunctionError) function :ranch_app.start/2 is undefined (module :ranch_app is not available)
            (ranch 1.8.0) :ranch_app.start(:normal, [])
            (kernel 8.3.2) application_master.erl:293: :application_master.start_it_old/4

oh and this is on the hated, monopolistic, useless Windows OS… sorry about that, no great all powerful mac os…

Most Liked

mindok

mindok

Have you tried deleting the _build directory and re-compiling?

theagilecoder

theagilecoder

I am using the same elixir and phoenix versions as OP but running on linux.
I am only gettting this annoying warning

warning: the :gettext compiler is no longer required in your mix.exs.

Please find the following line in your mix.exs and remove the :gettext entry:

compilers: [..., :gettext, ...] ++ Mix.compilers(),

(gettext 0.20.0) lib/mix/tasks/compile.gettext.ex:5: Mix.Tasks.Compile.Gettext.run/1
(mix 1.13.4) lib/mix/task.ex:397: anonymous fn/3 in Mix.Task.run_task/3
(mix 1.13.4) lib/mix/tasks/compile.all.ex:92: Mix.Tasks.Compile.All.run_compiler/2
(mix 1.13.4) lib/mix/tasks/compile.all.ex:72: Mix.Tasks.Compile.All.compile/4
(mix 1.13.4) lib/mix/tasks/compile.all.ex:59: Mix.Tasks.Compile.All.with_logger_app/2
(mix 1.13.4) lib/mix/tasks/compile.all.ex:36: Mix.Tasks.Compile.All.run/1

There is no line in my mix.exs that the error is alluding to. How can I remove the warning ?

dimitarvp

dimitarvp

I think the warning itself is fairly obvious: just remove the :gettext atom from the compilers list in mix.exs?

Last Post!

derek-zhou

derek-zhou

Elixir 1.13 compiled and running on otp 22 is ok; elixir 1.13 compiled with otp 22 but running on otp 24 would give me a second thought.

Where Next?

Popular in Questions Top

gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
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
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call t...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
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

electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New
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
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 43657 311
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36432 110
New
Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 127536 1222
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

We're in Beta

About us Mission Statement