Couldn't start phoenix server
edxzh opened this issue · 4 comments
Hi, when I run mix phx.server
, it throws me error like this, I'm new to phoenix, can you please let me know how to fix this? thanks.
** (Mix) Could not start application frampton: Frampton.Application.start(:normal, []) returned an error: shutdown: failed to start child: FramptonWeb.Endpoint
** (EXIT) shutdown: failed to start child: Phoenix.PubSub.PG2
** (EXIT) shutdown: failed to start child: Phoenix.PubSub.PG2Server
** (EXIT) an exception was raised:
** (UndefinedFunctionError) function :pg2.create/1 is undefined or private
(kernel 8.2) :pg2.create({:phx, Frampton.PubSub})
(phoenix_pubsub 1.1.2) lib/phoenix/pubsub/pg2_server.ex:43: Phoenix.PubSub.PG2Server.init/1
(stdlib 3.17) gen_server.erl:423: :gen_server.init_it/2
(stdlib 3.17) gen_server.erl:390: :gen_server.init_it/6
(stdlib 3.17) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Hello! This is an older project that I haven't maintained any in the last couple years. That said, it still starts up normally on my machine, could you provide some more details about your:
Operating system
elixir version
erlang version
That error looks like you're missing a dependency. Could you run mix deps.get
and try again?
Thank you for your replay Dylan.
my OS: Mac OS Big Sur 11.6.2
frampton ➤ elixir -v git:master*
Erlang/OTP 24 [erts-12.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit] [dtrace]
Elixir 1.10.0 (compiled with Erlang/OTP 21)
What does erl --version
show?
Based on this answer it looks like this app needs the phoenix_pubsub
dependency updated to 2.0 for compatibility with the latest Erlang.
I'd welcome a PR bumping that up.
Hi @dlederle , a PR was up for this and I tested locally, https://localhost:4000/editor works as expected.
Thanks for your time to look at this, I'll continue to learn phoenix and liveview, this issue can be closed if the PR is OK.