Comments (12)
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.
@leshill I've updated the ticket with a more accurate problem description. My first take on it was actually wrong.
from handlebars_assets.
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.
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.
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.
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.
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.
If you are in development mode, the files are cached in tmp/cache/assets, clear that directory out.
from handlebars_assets.
That is a good question. You need to identify where the assets are coming from :(
from handlebars_assets.
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.
oh, and thanks for your fast help! you are awesome, @leshill
from handlebars_assets.
Hi @nicolai86,
If you ever resolve exactly what was happening, please add it to this issue :)
from handlebars_assets.
Related Issues (20)
- text/x-handlebars MIME Type not supported in sprocket
- Templates not compiling at all without .jst extension
- Accessing Assets Helpers From Templates HOT 2
- Sprockets method `register_engine` is deprecated. HOT 2
- NoMethodError: undefined method `[]' for nil:NilClass HOT 1
- Not an error but still nothing in view HOT 3
- Handlebars in attribute broken in Rails by CVE-2016-6316 fix HOT 1
- handlebars outputting the javascript in the view and not rendering it. HOT 2
- Update vendored js from v4.0.5 to v4.0.10 HOT 1
- help with building vendored files from source HOT 2
- 'app.config.assets.configure' is 'undefined' in 'handlebars_assets/engine.rb' HOT 6
- Partial HBS file is not compiled into 'HandlebarsTemplates' variable HOT 5
- HandlebarsTemplates object not defined without backing model HOT 6
- allow using assets from global path instead of relative path in tests HOT 3
- changelog is missing versions HOT 1
- [NODE-SECURITY-1164] Upgrade to handlebars 4.3.0+ HOT 3
- Update Handlebars to 4.4.5 or higher for Handlebars Vulnerability HOT 1
- Sprockets v4 support HOT 5
- Mention generic options config in readme HOT 4
- Haml 6.x Support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from handlebars_assets.