I'm working on a Phoenix application and have run into a problem in production that I'm having trouble debugging.
** (UndefinedFunctionError) undefined function: Connection.start_link/2 (module Connection is not available)^M Connection.start_link(Postgrex.Connection, [hostname: "localhost", timeout: 5000, otp_app: :xxx, repo: xxx.Repo, adapter: Ecto.Adapters.Postgres, username: "xxx", password: "xxx", database: "xxx", extensions: [{Ecto.Adapters.Postgres.DateTime, []}, {Postgrex.Extensions.JSON, [library: Poison]}], port: 5432])^M (ecto) lib/ecto/adapters/connection.ex:27: Ecto.Adapters.Connection.connect/2^M (ecto) lib/ecto/pools/poolboy/worker.ex:58: Ecto.Pools.Poolboy.Worker.handle_call/3^M (stdlib) gen_server.erl:629: :gen_server.try_handle_call/4^M (stdlib) gen_server.erl:661: :gen_server.handle_msg/5^M (stdlib) proc_lib.erl:240: :proc_lib.init_p_do_apply/3^M
Yes, it is a bug in Postgrex which is fixed on master. Just add :connection
to the list of applications in your mix.exs
file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With