Comments (6)
Rails 2.3 reached EOL on 2013-06-25; I would recommend updating your Rails application.
There might be an old version of handlebars_assets that would support that old version of Rails, but it is pretty unlikely since a lot changed between Rails 2.x and 3.x. I would personally not recommend going this path.
from handlebars_assets.
Apologies. My mistake. My Rails version is 3.2.22.5
Any specific 'Sprockets' gem version to be used ?
I am using "sprockets" --> "2.2.3" & "turbo-sprockets-rails3" --> "0.3.14"
One quick note :
I dont use '/app/assets/javascripts' folder. Instead I put all my javascripts & hbs templates folder inside '/public' folder. I haven't tried deploying this code to my server yet. Do you foresee any errors in this folder structure approach ?
I created an initializer called handlerbars_init.rb to update the 'path_prefix' config value :
HandlebarsAssets.configure do |config|
config.template_namespace = 'HandlebarsTemplates'
config.path_prefix = '/public/javascripts/templates'
end
from handlebars_assets.
@happyvig I would not recommend doing this in public; there is a reason public is different then app/assets/javascripts ; generally using rails and going against convention will be bad news.
the public folder is used for static assets POST compilation; by putting your assets in the folder you may have conflict; and access to public files will be available in most environments (exposed to public).
from handlebars_assets.
True. Valid point there.
Question 1 :
Any specific 'Sprockets' gem version to be used when using 'handlebars_assets' v0.23.2 gem ?
I am using "sprockets" --> "2.2.3"
& "turbo-sprockets-rails3" --> "0.3.14"
Question 2 :
And also template namespace override is not working when specified via an initializer as
HandlebarsAssets.configure do |config|
config.template_namespace = 'HandlebarsTemplates'
config.path_prefix = '/public/javascripts/templates'
end
or by specifying inside config/application.rb
as
HandlebarsAssets::Config.template_namespace = "HBS"
Appreciate your thoughts about this.
from handlebars_assets.
Q1. not that I am aware of; last time I was running with sprockets 3 I believe (its been a long time)
Q2. not sure how that could be happen, and I don't really have time to debug; most of the code is at: https://github.com/leshill/handlebars_assets/blob/master/lib/handlebars_assets/handlebars_template.rb and I believe everywhere is correct for use of template namespace.
from handlebars_assets.
Thank you.
I have figured out that the latest version of the gem (0.23.2) is not working with Sprockets 2.x and that's why it was throwing ''app.config.assets.configure" as undefined for me.
I believe "app.config.assets.configure" gets defined in the Sprockets 3.x (not tested)
Since my app uses Sprockets 2.x currently, I am planning to use a lower version of the gem (0.20.2) which does not rely on 'app.config.assets.configure' method.
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
- 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.