GithubHelp home page GithubHelp logo

Comments (12)

leshill avatar leshill commented on June 7, 2024

Hi @nicolai86,

This was not clear to me from your description: did you regenerate the assets in the private gem? All the templates your app uses need to be regenerated.

from handlebars_assets.

nicolai86 avatar nicolai86 commented on June 7, 2024

@leshill I've updated the ticket with a more accurate problem description. My first take on it was actually wrong.

from handlebars_assets.

leshill avatar leshill commented on June 7, 2024

Hi @nicolai86,

I am not familiar with that setup, but from looking at the compiler info we can see that the gem templates are not using the latest gem. Some possibilities:

  • The gem packages the out of date templates. This can be checked by looking inside the gem.
  • If the gem is an engine, perhaps it is packaged with an older version of handlebars_assets?
  • Have you examined public/assets?

from handlebars_assets.

nicolai86 avatar nicolai86 commented on June 7, 2024

Hey @leshill ,

since public/assets is empty and the gem is also declaring handlebars_assets 0.12.1 inside the gemspec I guess it's due to out of date templates.
I'm the maintainer of that gem - so how do I force the templates to be regenerated without touching each and every one of them?

from handlebars_assets.

leshill avatar leshill commented on June 7, 2024

Hi @nicolai86,

Since the situation is opaque to me: where exactly are the out-of-date precompiled templates? Inside the gem? Inside the app somewhere? Somewhere else (cloudfront etc)?

from handlebars_assets.

nicolai86 avatar nicolai86 commented on June 7, 2024

Hey @leshill

well that's kind of confusing to me, too.
The raw templates are inside the gem, but they should be precompiled inside the app since it's requiring the templates using the asset pipeline.
So the app is serving the out-of-date precompiled templates.

from handlebars_assets.

nicolai86 avatar nicolai86 commented on June 7, 2024

what's confusing me is that changing the templates inside the gem solves my problem, while clearing the asset cache does not. how can that be? :(

from handlebars_assets.

leshill avatar leshill commented on June 7, 2024

If you are in development mode, the files are cached in tmp/cache/assets, clear that directory out.

from handlebars_assets.

leshill avatar leshill commented on June 7, 2024

That is a good question. You need to identify where the assets are coming from :(

from handlebars_assets.

nicolai86 avatar nicolai86 commented on June 7, 2024

I guess I'll settle with changing all templates, since that solves my problem for now.

One interesting observation though:

First, I'm removing the tmp/cache directory:
rm -fr /tmp/cache/

Now, I'm using cURL to request a template from my gem, but the asset cache directory has not been recreated.

looks like javascript files from external resources are handled differently. The log only reads

Started GET "/assets/templates/fail_bowl_template.js?body=1" for 127.0.0.1 at 2013-05-25 00:15:39 +0200
Served asset /templates/fail_bowl_template.js - 200 OK (0ms)

This puzzles me - since if they are not cached, why would I get stale compilerInfos ?

There's some magic going on I can't understand right now. :(

from handlebars_assets.

nicolai86 avatar nicolai86 commented on June 7, 2024

oh, and thanks for your fast help! you are awesome, @leshill

from handlebars_assets.

leshill avatar leshill commented on June 7, 2024

Hi @nicolai86,

If you ever resolve exactly what was happening, please add it to this issue :)

from handlebars_assets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.