Open SampsonCrowley opened 6 years ago
From what I can tell, the associated .rb
file is never called whatsoever
I'm really tearing my hair out with this one...
I'm in a similar situation😞 @SampsonCrowley Did you able to resolve?
I experienced a similar problem but only in Rails 5, whereas it was fine in Rails 4.
To get around this, I have our .html.mustache Mustache templates in app/views, but the .rb class files in app/presenters, then in an initializer:
ApplicationController.view_paths = ApplicationController.view_paths.reject do |path|
path.to_s == Rails.root.join('app', 'views').to_s
end
Stache.configure do |c|
c.use :mustache
c.template_base_path = ::Rails.root.join('app', 'views')
end
@rwd Thank you for your reply! but not working 😢 which version of stache do you use?
stache (1.2.0)
@t-okamoto19 ah, shame :(
stache 1.2.0 and mustache 1.0.3 here.
@rwd our .rb class files is here. 'app/views/layouts' is it cause of problem? im working on upgrading rails4.1 to rails5.2.
@t-okamoto19 as I mentioned above, I needed to move the .rb files into a different directory from the .html.mustache files, e.g.
@rwd thanks! I'll try later and share the results.
@t-okamoto19 no I don't think that I did. I decided this repo wasn't worth using since the devs don't seem to care about user issues (notice you're the first reply since I opened the issue 2 MONTHS ago)
I cannot for the life of me figure out why, by my templates that work perfectly in development are never called in production. somehow the template is still being rendered but all variables are blank and
puts
statements that I put in the methods are never called in production