smahi

smahi

Phoenix release - Module not found

Hi
I have deployed a Phoenix app using Dockerfile, the Dockerfile is generated using mix mix phx.gen.release --docker
I have a module in prod/support/seeds.ex that is not compile for some reason in production, I am not able to call Utamktaba.Prod.Seeds.run because the module is not found.
The same module is available in the release if deployed using mix phx.gen.release
Did I miss something?

# mix.exs
def project do
    [
     # ...
      elixirc_paths: elixirc_paths(Mix.env()),
     # ...
    ]
  end

  defp elixirc_paths(:dev), do: ["lib", "dev/support"]
  defp elixirc_paths(:test), do: ["lib", "dev/support", "test/support"]
  defp elixirc_paths(_), do: ["lib", "prod/support"]

Most Liked

dimitarvp

dimitarvp

It does look like it should be there. Can you hop on a prod console and run Code.ensure_compiled(Utamktaba.Prod.Seeds) and then Code.ensure_loaded(Utamktaba.Prod.Seeds) and check what both return?

smahi

smahi

Where Next?

Popular in Questions Top

JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New

Other popular topics Top

New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 54996 245
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
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
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New