Skip to content

Commit fc797c6

Browse files
committed
Suggest defining config.assets.css_compressor = nil (#129)
1 parent fe740ee commit fc797c6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,15 @@ Some CSS packages use new CSS features that are not supported by the default Sas
4343

4444
A common issue is that your repository does not contain the output directory used by the build commands. You must have `app/assets/builds` available. Add the directory with a `.gitkeep` file, and you'll ensure it's available in production.
4545

46+
### How do I avoid `ActionView::Template::Error: Error: Function rgb is missing argument $green`?
47+
48+
This might happen if your Gemfile.lock contains the legacy `sassc-rails`, which might be need while progressively migrating your project, or which might be a transitive dependency of a gem your project depends on and over which you have no control. In this case, prevent Sprockets from bundling the CSS on top of the bundling already performed by this gem. Make sure do this for all environments, not only production, otherwise your test suite may fail.
49+
50+
```
51+
# config/initializers/assets.rb
52+
Rails.application.config.assets.css_compressor = nil
53+
```
54+
4655
### Why isn't Rails using my updated css files?
4756

4857
Watch out - if you precompile your files locally, those will be served over the dynamically created ones you expect. The solution:

0 commit comments

Comments
 (0)