Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix .jpeg precompile issue #781

Merged
merged 1 commit into from Mar 13, 2023
Merged

Fix .jpeg precompile issue #781

merged 1 commit into from Mar 13, 2023

Conversation

ghiculescu
Copy link
Member

@ghiculescu ghiculescu commented Feb 10, 2023

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 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 rails/sprockets-rails#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JPEG extension is now forced to JPG
2 participants