Wednesday, 30 November 2011

Rails3.1- Asset isn't precompiled error

Recently on a production env, I was annoyed with "<Asset> isn't precompiled" error, though it was compiled using rake assets:precompile. I wasn't able to figure out the root cause. However I was able to work around.

I'd assets included on the view, using <content_for>. I removed and required it within the controller specific asset file and things started working. So as far as I can say NEVER require assets within the view, using <content_for> or <provide>. Asset pipeline, chokes for some reason.

No comments:

Post a Comment