ember-rails icon indicating copy to clipboard operation
ember-rails copied to clipboard

doc update: mention conflict with handlebars_assets

Open jacquescrocker opened this issue 11 years ago • 4 comments

having the handlebars_assets gem in along with ember-rails will cause an unending fury of frustration since none of the templates will ever get picked up and you wont know why

a few ideas to make this little conflict less painful to people adding ember-rails to an existing project:

low effort: add a note in the readme recommending to remove handlebars_assets when using ember-rails

medium effort: add runtime check with error message

high effort: allow both gems to work happily together

I can possibly tackle the low/medium effort items. high effort one is probably not required as long as we're clear that handlebars_assets and ember-rails are Gemfile mortal enemies

jacquescrocker avatar Jan 19 '14 01:01 jacquescrocker

@railsjedi - I think the low + medium effort items you have listed would likely do enough to make this much less of an issue (at least on the debugging side). A PR would definitely be welcome...

rwjblue avatar Jan 19 '14 01:01 rwjblue

awesome, will do

jacquescrocker avatar Jan 19 '14 01:01 jacquescrocker

In the debugger I noticed that the templates were being loaded up, they were just being added to the wrong object.

screen shot 2014-12-16 at 1 09 30 am

This seems to work around the issue:

window.Application = Ember.Application.create
  ready: ->
    Ember.TEMPLATES = HandlebarsTemplates

seanlinsley avatar Dec 16 '14 07:12 seanlinsley

Turns out the that approach doesn't work because Handlebars isn't set up to use Ember's helpers. I'm not sure how to get that working, so I ended up scrapping this approach and removing the handlebars_assets gem.

seanlinsley avatar Dec 22 '14 17:12 seanlinsley