Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes rails/sprockets-rails#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 rails/sprockets-rails#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.