nikitas

nikitas

Cannot start app after update with Erlang 24

After updating with Erlang 24 I cannot start app because the function :pg2.create/1 is undefined or private. Here is the response I get after executing mix phx.server

** (Mix) Could not start application wui: Wui.Application.start(:normal, ) returned an error: shutdown: failed to start child: Wui.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.0) :pg2.create({:phx, Wui.PubSub})
(phoenix_pubsub 1.1.2) lib/phoenix/pubsub/pg2_server.ex:43: Phoenix.PubSub.PG2Server.init/1
(stdlib 3.15) gen_server.erl:423: :gen_server.init_it/2
(stdlib 3.15) gen_server.erl:390: :gen_server.init_it/6
(stdlib 3.15) proc_lib.erl:226: :proc_lib.init_p_do_apply/3

Any advice on how to proceed will be much appreciated. Thanks in advance.

Marked As Solved

josevalim

josevalim

Creator of Elixir

Yeah, updating Phoenix.PubSub to the latest should be enough to address the issue. The latest version is 2.0.0, so you will have to update your deps so you can bump to latest.

15
Post #3

Also Liked

hauleth

hauleth

:pg2 was deprecated some time ago and was scheduled to be removed on OTP24. You probably need to update the dependency and recompile the phoenix_pubsub to compile time selection of the implementation.

nikitas

nikitas

Thanks a million guys. I updated phoenix to 1.5.9 and phoenix_pubsub to 2.0.0 and now everything works fine!

axelson

axelson

Scenic Core Team

Additionally as part of the Phoenix 1.4.x → 1.5.0 upgrade you should change that line to:

{Phoenix.PubSub, name: UserDocs.PubSub}

Assuming you’re already on Phoenix 1.5.x (which you probably should be if you want to be using OTP 24) I would take a close look at the upgrade guide to ensure that you’re not missing any of the other steps: phx-1.5-upgrade.md · GitHub

Where Next?

Popular in Questions Top

RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
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
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New

Other popular topics Top

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
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

We're in Beta

About us Mission Statement