sporkd / html5-rails

Generate Html5 Boilerplate for your Rails apps!
https://github.com/sporkd/html5-rails
MIT License
240 stars 35 forks source link

Adding the polyfills.js to the assets-pipeline #9

Closed Maher4Ever closed 1 year ago

Maher4Ever commented 12 years ago

Hey there,

First, I would like to thank you for this great gem (and the previous version too)... It made upgrading my app to rails 3.1 so easy :)

While deploying my updated rails 3.1 app, I had a problem with the assets-pipeline. I know this gem might not be production-ready yet (is it?), but It worked great with the development rails-env.

After digging deep, I found out that the polyfills.js was not being compiled on the production-env (which is not needed on the dev-env of course).

I had to add the following to config/environments/production.rb file to make it work:

  config.assets.precompile += %w( polyfills.js )

I hope this gets fixed or at least added to the readme to spare other folks the trouble.

sporkd commented 12 years ago

Thanks for the feedback @Maher4Ever!

Yea, I'm aware. I even added this TODO at one point: https://github.com/sporkd/html5-rails/blob/master/lib/generators/html5/assets/assets_generator.rb#L48

I was planning on having the assets generator to insert this line in application.rb, or perhaps even better to generate a rails initializer for this. But thanks for documenting it. Hopefully I'll get some time to add that soon.