You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a gem containing Mustache templates and a Rails engine
that gem's Rails engine setting Stache.template_base_path to a relative path, e.g. "app/templates"
a Rails application including that gem in its bundle
... then in general, everything works: Mustache templates are loaded from the application's app/templates directory if they exist, or if not, then from the gem's. View classes are created in the application's app/views directories.
The problem is when Stache::Mustache::Handler#compile identifies the template as a class, in our case a false positive because the source includes the string "module". It then looks for a template file in the Stache.template_base_path as though it was an absolute path and:
finds nothing because Stache.template_base_path is relative
does not detect that no file is found and attempts to read it anyway
File.read(file) (L64) fails with a TypeError, with the message "no implicit conversion of nil into String"
The text was updated successfully, but these errors were encountered:
When we have:
Stache.template_base_path
to a relative path, e.g. "app/templates"... then in general, everything works: Mustache templates are loaded from the application's app/templates directory if they exist, or if not, then from the gem's. View classes are created in the application's app/views directories.
The problem is when
Stache::Mustache::Handler#compile
identifies the template as a class, in our case a false positive because the source includes the string "module". It then looks for a template file in theStache.template_base_path
as though it was an absolute path and:Stache.template_base_path
is relativeFile.read(file)
(L64) fails with aTypeError
, with the message "no implicit conversion of nil into String"The text was updated successfully, but these errors were encountered: