Skip to content

Commit

Permalink
Update README.md (#112)
Browse files Browse the repository at this point in the history
### 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: rails/tailwindcss-rails#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.
  • Loading branch information
benkoshy committed Dec 21, 2022
1 parent 0d06dea commit 052ba22
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

1 comment on commit 052ba22

@ethan-dowler
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you @benkoshy for adding this note! I ran into this problem and my solution was to delete my local repo and re-clone it haha. This is much more elegant.

Please sign in to comment.