I had a resource which used a template in Chef, and it worked fine. Other resources and recipes in the cookbook could call this resource. In my case, I defined a maven artifact resource, where given some maven params (repo name, artifact ID, etc), you could download a file from a Nexus maven repo.
However, when I call the resource from any other cookbook other than that in which it is defined (with metadata.rb specifying the dependency, of course), I get an error
Chef::Exceptions::FileNotFound
------------------------------
template[/usr/local/nexus-download.bash] (/tmp/kitchen/cache/cookbooks/cookbook-1/resources/nexus_http_artifact.rb line 52) had an error: Chef::Exceptions::FileNotFound: Cookbook 'cookbook-2' (1.0.0) does not contain a file at any of these locations:
[...]
The template was basically a bash script that was later run to download an artifact over the network from a maven repo (Nexus), after checking the MD5 sum and comparing to the current download using the Nexus HTTP API.