leshill / handlebars_assets

Use handlebars.js templates with the Rails asset pipeline.
MIT License
648 stars 159 forks source link

Putting gem in assets #41

Closed justin808 closed 11 years ago

justin808 commented 11 years ago

group :assets do gem 'handlebars_assets' end

If you do that, the rails app will not work in development mode, as handlebars.runtime is not found.

The fix is to not put the gem in the assets group.

This is with rails 3.2.9.

leshill commented 11 years ago

Hi @justin808,

I just double-checked on a simple example app running 3.2.9 and using the assets group and this line in application.js:

//= require handlebars.runtime

This works as intended. Perhaps there is something else going on in your dev environment?

justin808 commented 11 years ago

Any downside to putting outside the assets group?

leshill commented 11 years ago

Hi @justin808,

Not really, but you should not need to do this.