Mix Release failing - Config.Reader failed with undefined function config/3

Am trying to deploy a phoenix app using mix releases on gigalixir. I was following these instructions in their docs but when I reach this step. MIX_ENV=prod APP_NAME=my_app PORT=4000 _build/prod/rel/my_app/bin/my_app start. I get this error message.

ERROR! Config provider Config.Reader failed with:
** (CompileError) _build/prod/rel/my_app/releases/0.1.0/releases.exs:1: undefined function config/3
    (elixir) src/elixir.erl:306: :elixir.quoted_to_erl/3
    (elixir) src/elixir.erl:266: :elixir.eval_forms/4
    (elixir) lib/code.ex:240: Code.eval_string/3
    (elixir) lib/config.ex:219: Config.__eval__!/2
    (elixir) lib/config/reader.ex:44: Config.Reader.read!/2
    (elixir) lib/config/reader.ex:24: Config.Reader.load/2
    (elixir) lib/config/provider.ex:206: anonymous fn/2 in Config.Provider.run_providers/2

Am not sure what’s wrong. Any ideas?

Please show the top of your release file.

1 Like

I got it. I didn’t import the Config module.

2 Likes