The issue was that in development (using HelperAssetResolvers::Environment in sprockets-rails), it would gracefully handle the jpeg/jpg confusion. But when precompiling, it would only write a .jpg file. Then in production (using HelperAssetResolvers::Manifest in sprockets-rails) it would error as no .jpeg file exists.
There's several PRs linked from https://github.com/rails/sprockets-rails/issues/304 where people have had to rename files from jpeg to jpg to work around this. That workaround is fine, the problem is that it only breaks in production so people typically find the issue when production breaks.
Fixes https://github.com/rails/sprockets-rails/issues/304
There is a replication app available at https://github.com/ghiculescu/sprocketsdemo. When that repo is pointed to this PR, the tests pass.
The issue was that in development (using
HelperAssetResolvers::Environment
in sprockets-rails), it would gracefully handle thejpeg/jpg
confusion. But when precompiling, it would only write a.jpg
file. Then in production (usingHelperAssetResolvers::Manifest
in sprockets-rails) it would error as no.jpeg
file exists.There's several PRs linked from https://github.com/rails/sprockets-rails/issues/304 where people have had to rename files from
jpeg
tojpg
to work around this. That workaround is fine, the problem is that it only breaks in production so people typically find the issue when production breaks.