From 2575f00d8fb30cab029289a994d7c5ddc8b49008 Mon Sep 17 00:00:00 2001 From: Ben Koshy Date: Tue, 20 Dec 2022 11:24:35 +1100 Subject: [PATCH] Update README.md ### What is this PR? Adds a trouble-shooting solution - sprockets wasn't serving an updated css file. Why not? After many hours of hair-pulling, I stumbled upon this issue: https://github.com/rails/tailwindcss-rails/issues/119 which saved the day. It's easy to overlook, and probably warrants a note in the documentation. Hence this PR. Hopefully, it will save someone a lotta of trouble. --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index ff12ef5..d0423e2 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,14 @@ Some CSS packages use new CSS features that are not supported by the default Sas 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. +### Why isn't Rails using my updated css files? + +Watch out - if you precompile your files locally, those will be served over the dynamically created ones you expect. The solution: + +```shell +rails assets:clobber +``` + ## License CSS Bundling for Rails is released under the [MIT License](https://opensource.org/licenses/MIT).