sprockets-rails
sprockets-rails copied to clipboard
Manifest and Environment resolver inconsistencies
The Environment resolver uses a forgiving search pattern that does not require assets such as images to specify their extension. The Manifest resolver does not. This means that given a app/assets/images/foo.png, syntax like image_tag('foo') will resolve fine locally and fail spectacularly when deployed to production.
Is this intended? It seems very error-prone.
I encountered the same problem. My teammate insert image_tag('bar') in the index page, it worked in development environment, but crashed in production environment. That was terrible. I think we should make it consistent in any environment.