jbuilder icon indicating copy to clipboard operation
jbuilder copied to clipboard

Couldn't find template for digesting

Open h8rry opened this issue 9 years ago • 3 comments

I am getting an warning/error message - "Couldn't find template for digesting" for my partials while using json.cache! in 2.6.0, but everything works for me.

I am having a hard time finding an explanation online. Can anyone help me out here?

h8rry avatar Oct 18 '16 02:10 h8rry

Got this warning too in my log files, but I found a solution / the reason for this. I have an api backend with different namespaces. In my templates I use "json.partial! 'TEMPLATE', VARS". Following this syntax I receive these warnings. But if I provide the full path to the partial ( "json.partial! 'my/path/to/template', VARS" ), everything works fine.

Update: I only get this warnings while using "json.cache!" syntax.

knobsam avatar Nov 03 '16 13:11 knobsam

how are you providing full path exactly?

rsl avatar Jan 26 '17 15:01 rsl

Stumbled on this issue after debugging and resolving the issue myself within a namespaced api backend as well. Rails is rendering it properly even though its being logged. Oddly enough, I still see the error in the logs even if I comment out the guilty line within the json.cache! block.

Providing the fully-qualified relative path within the views directory, the error messaging goes away: partial: 'bar' vs partial: 'my/namespace/foo/bar'

on Rails 6.0.3.3 and jbuilder (2.10.1)

joshtaylor avatar Sep 28 '20 16:09 joshtaylor