Asked Jan 21st, 2022 3:05 a.m. 151 0 1
  • 151 0 1
-2

[PHOENIX]_Error when build system

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

1 ANSWERS


Answered Jan 21st, 2022 3:49 a.m.
Accepted
+1

Bạn nên ghi chi tiết lỗi như thế nào, xảy ra khi nào, version Erlang, version OTP, version Elixir hiện tại đang dùng, version của phoenix_pubsub ra để người đọc có thể hiểu và giúp bạn nhé. Anw, theo như lỗi thì có vẻ là version phoenix_pubsub cũ quá, bạn làm theo hướng dẫn ở đây, nâng version lên mới nhất xem sao. Cheers! https://elixirforum.com/t/cannot-start-app-after-update-with-erlang-24/39708/7

Share
Jan 21st, 2022 5:02 a.m.

error.png

nó báo lỗi ở dòng method init ( hình như nó không tìm thấy server name)

0
| Reply
Share
Jan 21st, 2022 8:04 a.m.

@thanhpv10 theo log thì lỗi là:

** (UndefinedFunctionError) function :pg2.create/1 is undefined or private

nên mình nghĩ là do sai version đấy, bạn check lại file mix.exs nâng version lên xem sao. VD:

{:pubsub, "~> 2.0.0"}
0
| Reply
Share
Viblo
Let's register a Viblo Account to get more interesting posts.