-
Notifications
You must be signed in to change notification settings - Fork 176
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
Dev Server/Tailwind Watch Mode Not Refreshing #119
Comments
Thank you for saving me from tearing out my hair ❤️ |
@richjdsmith Saved me too, thanks! |
Sounds like you had precompiled locally. Precompiled files take precedence over dynamic files with Sprockets. |
### 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.
### 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.
Thank you!! I was going crazy with this error.
Thanks again |
@richjdsmith so does anyone have a specific @fabioacd is everything working well for you with |
### 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.
Thank you! That is very helpful. |
I can't replicate this so I'm going to create this issue then close it in hopes it helps some other poor bugger googling the issue. When I was running my rails server (locally only) and running Tailwind in watch mode, I had a funny issue where Tailwind was producing a new version of
application.css
but my rails server was not using the new version.If I restarted the rails server, it had no effect. If I ran
rails assets:precompile', it would produce a new version of the tree-shaken
applicaiton.css` but the dev server would not use it. I could not use new tailwind classes in my code.The solution:
rails assets:clobber
That sorted it out and got my server acting as expected. I have no idea why. This was running on a project that was a couple hours hold running Rails 7.0, Ruby 3.0.3 and using the tailwindcss-rails gem for Tailwind.
I have tried to replicate this but have not been able to. Hoping at least this will help someone else from a couple of hours tearing out their hair.
The text was updated successfully, but these errors were encountered: