alexspeller / emblem-rails

Emblem.js integration with rails asset pipeline
MIT License
34 stars 21 forks source link

application.html.emblem not recognized #12

Closed oliverbarnes closed 11 years ago

oliverbarnes commented 11 years ago

Hey @alexspeller, not sure if you'll remember, but after talking to you on IRC yesterday I figured out the problem I was having - a handlebars template was expected.

Once I added an inline template, the test ran, but the template broke - the handlebars syntax wasn't recognized by slim, the templating engine we were using.

Looking for a solution I learned of Emblem, and understood it was like slim, only it plugged with Ember seamlessly.

So i went ahead and installed it, and ported the slim templates to Emblem's syntax. But when I try to get the app running .emblem isn't recognized:

Missing application/index with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :raw, :ruby, :coffee]}. 
machty commented 11 years ago

Emblem isn't meant to be used to create static HTML files, but rather JavaScript templates. It'll work for files ending in .js.emblem.

alexspeller commented 11 years ago

...only enough to find out handlebars doesn't run out of the box with ember :)

Handlebars does work out of the box with ember, not quite sure what you mean by this...

alexspeller commented 11 years ago

Closing this issue as it's not an issue with emblem rails.

oliverbarnes commented 11 years ago

Ok, that elucidates it somewhat - but I was under the impression emblem would be able to replace slim templates, including .html.slim ones?

Might be a misunderstanding of mine, of course.

About handlebars not working out of the box, I meant with slim templates, sorry. Updating the issue.

oliverbarnes commented 11 years ago

Updated the issue. From what I understand, emblem-rails would be responsible for setting the template handler? In the source I only see a pre-compiler set... I might be missing something for sure, but I'd appreciate if you could clarify it, please. If handlebars is doing the handling, that explains why only pre-compiling is done. But then why don't html.emblem templates get recognized?

alexspeller commented 11 years ago

No, emblem renders client side templates not server side templates. If you want to render both you need to use emblem and slim in your app.

oliverbarnes commented 11 years ago

Ok, that makes sense. I see what you mean by why this wouldn't be an emblem-rails issue, but rather my newbieness in Ember :) thanks again