hamlbars
hamlbars copied to clipboard
Hamlbars causes an illegal nesting error
Here's what I've done:
- I added Hamlbars to the Gemfile:
gem 'hamlbars', '~> 2.1'
. We're already usinghandlebars_assets
. - I created a new file file at
app/assets/javascripts/test.js.hbs.hamlbars
. - I added this to that file:
%p Testing
.
When I open the project in my browser, I get the following error:
throw Error("Haml::SyntaxError: Illegal nesting: nesting within plain text is illegal.\n (in /Users/landonschropp/Development/quve/app/assets/javascripts/test.js.hbs.hamlbars)")
I've also tried removing everything from the test
file and I still get the same error.
In case there's a conflict, these are all of the asset gems we're using:
gem 'sass-rails', '~> 4.0.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'haml-rails'
gem 'handlebars_assets'
gem 'gon'
gem 'autoprefixer-rails'
gem 'roadie'
gem 'redcarpet'
gem 'hamlbars', '~> 2.1'
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'videojs_rails'
gem 'pickadate-rails', "~> 1.2.0"
gem 'datejs-rails'
+1
@LandonSchropp @KurtPreston
I was having the same problem but renaming the file to just test.hamlbars
did the trick.
@hopsor If you just do .hamlbars
, how do you compile the raw Handlebars output?
Are there any news on this issue?