I’ve added a new route for my Page Controller to handle.
get "/reaper-u", PageController, :reaper_u
The requisite handler is in the PageController:
def reaper_u(conn, _params) do render(conn, "reaper_u.html") end
The file is right there with all the other template files for this view.
When I renamed the file to try to shake something loose, I saw the following response in iex, so Phoenix Live Reload appears to be tracking the file.
[debug] Live reload: lib/reapercon_web/templates/page/reaper_u.html.eex
It’s all really vanilla stuff. The template only has a h2 block in it.
Phoenix.Template.UndefinedError at GET /reaper-u Could not render "reaper_u.html" for ReaperconWeb.PageView, please define a matching clause for render/2 or define a template at "lib/reapercon_web/templates/page/*". The following templates were compiled: * conduct.html * costume_contest.html * events.html * exhibitors.html * faq.html * index.html * merch.html * schedule.html * venue.html * wraithking.html
In my rage and desperation, I cleared out my mix deps and rebuilt all of them. (mix deps.clean --all; mix deps.get) No dice.
Finally, I shut down my local instance, rm -fr _build from the directory root, and started the server again. Now it works. Template compiles, I can continue working.
To test, I add another template, route, etc. The template will not compile on its own. I have to delete _build and everything is fine.
It seems to me that deleting the _build directory to get a template to compile is a little extreme, but here we are.
It appears that the template compilation is stuck somehow, refusing to see the new file, and not updating until I take a hammer to the _build directory. Is there something I’m missing that would cause this to happen? I hope the solution ends up being crushingly and embarrassingly obvious, but I can’t see it.