Skip to content

Suggest defining config.assets.css_compressor = nil #129

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

Merged
merged 2 commits into from
Dec 28, 2023
Merged

Conversation

sedubois
Copy link
Contributor

@sedubois sedubois commented Sep 4, 2023

We are migrating our project away from sassc-rails towards cssbundling-rails with sass (and in preparation for introducing tailwind in parallel with that while we rewrite everything), however we still use administrate which as of writing still depends on sassc-rails.

At first we defined config.assets.css_compressor = nil by uncommenting the line in config/environments/production.rb, but only later realized this did not affect the test environment, which is the reason why our test suite was still failing with errors such as ActionView::Template::Error: Error: Function rgb is missing argument $green, and I believe other seemingly incomprensible errors such as ActionView::Template::Error: Asset X was not declared to be precompiled in production even though they were included in the Sprockets manifest. Perhaps this PR will prevent someone else from encountering the same misfortune.

Additional idea: how about having the gem raise a warning if config.assets.css_compressor is not nil?

@gregnavis
Copy link

@sedubois, thank you for this PR. I've been struggling with exactly this problem on the project that I migrating from Bulma to Tailwind. Additionally, it uses administrate. My only question is whether this specific error message you mentioned, which I also experienced, is the only way in which the problem can manifest itself.

@dhh dhh merged commit b27be4a into rails:main Dec 28, 2023
@sedubois sedubois deleted the patch-1 branch December 28, 2023 08:48
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.

3 participants