(Phoenix.Template.UndefinedError) Could not render "index.html"

hi. I am new to elixir and Phoenix and wrote a first app… this apps works fine when i run it in dev mode and with prod release on my local machine. I want to deploy with docker and thought this will work as well, the docker build after the mix task … gen.release --docker starts, but with the first access via browser it fails with this error:

     ** (Phoenix.Template.Und
efinedError) Could not render "index.html" for ProberParameterfileAsse
mblerWeb.PostsView, please define a matching clause for render/2 or de
fine a template at "lib/proberparameterfileassembler_web/templates/pos
ts/*". No templates were compiled for this module.

after seaching for a fix I tried with the mix compile --force but the error still occurs.

I recently updated to elixir 1.14.1 and phoenix 1.6.15 (from 1.4 , it was started with) but there i had not tried the docker deployment.

can someone help me ? I think there is a minor think i was not aware of. if you need more logs/ file contents … i will provide.

thanks in advance

Are you deploying the same versions across dev and production ?

This is kind of demo… There is no real application jet. But I want to share this demo with colleagues…

And I was not sure if ‘release’ really works with dev and so on. So yes… It’s the same. I also can switch to dev for the deployment… But I think the issue will be the same.

Why you asking?

Sadly I am at a point where I think about to skip this
Elixir/Phoenix solution… I heared a lot awesome and nice stories about it. But for me it feels it’s not ready for mass development

By release, I meant what you are running in your docker configuration. Its pretty uncommon to see it change between the “mix” environment of dev and production, but rather I think thta you’re running different releases in docker.

Phoenix may not be for you, and thats okay. You should use whatever tooling makes sense for you in your journey.

However it think you dont have a template for your view, which is the solution to have your code work correctly.

Create the relevant template in the directory it asks something.html.heex and that should solve the error.

There was some changes in views: Check out the docs here:


Make sure that the version you are reading matches the version you are deploying.