-
Notifications
You must be signed in to change notification settings - Fork 189
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Tailwind live rebuild doesn't work on new application when modifying a view #521
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
Comments
Hi @sarrietav-dev, does your
if there are no errors, of course. The first line indicates which version of tailwindcss you're running (I'm asuming latest, but can you clarify?), and the second one that it built the output file. Then, every time you change a source file, you should be seeing a Could you indicate which versions of rails and tailwindcss-rails are you using? Also can you tell if that process is running without errors?
Regarding this, this gem doesn't provide live-reloading of your browser. If that's what you're after, you should be looking at hotwired/spark. |
Hello @patriciomacadden I'm using the latest version of Yes, the
And I only get this line just once on the logs:
I also tried to use I think the issue is that the tailwind process only builds the output stylesheet once but doesn't watch for new changes. |
@sarrietav-dev We need more information in order to be able to diagnose what you're seeing. I cannot reproduce what you're describing, following the steps you have run above. In particular, I see the following lines emitted by the
Then, when I refresh the web page in the browser, I see the updated style. It's all working for me. What are you seeing emitted from the What's your setup? I'm running on a Linux x86_64 machine, I'm not using docker, and I'm using tailwindcss-rails 4.2.1 and tailwindcss-ruby 4.0.16. In particular, are you running in a Docker container or running on Windows with WSL? |
@flavorjones I'm using a Linux x86_64 laptop running Ubuntu 24.04. My Gemfile.lock says that I'm using tailwindcss-rails 4.2.1 and tailwindcss-ruby 4.0.16. I'm using ruby 3.3.5 through rbenv 1.3.2 and node 22.14.0. No Docker. Below there's the code that I used and a video of the issue. sarrietav-dev/tw-rails-issue-rep Screencast.From.2025-03-25.17-38-07.webm |
Hi @flavorjones @patriciomacadden, I tested the code on a Github Codespace and it worked as intended. I guess the issue is my machine. |
@sarrietav-dev Thanks for letting us know. I poked around in the upstream issues and learned that the tailwind CLI uses https://github.com/parcel-bundler/watcher for watching for file changes. Perhaps there's something mentioned in that project's code or docs that might help you? In them meantime, since I don't believe there's anything we can easily do in this project, or in tailwindcss-ruby, to help, I'm going to convert this to a discussion. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Hello, team,
I’m experiencing an issue with live rebuild not functioning correctly in a new Rails application when modifying a view. Here's how to replicate the issue:
Steps to reproduce:
Post
model:PostsController
:/posts/index
route in the browser.app/views/posts/index.html.erb
file by adding a new class to a tag.Additional information:
I would appreciate any suggestions or workarounds for this issue.
Thank you!
The text was updated successfully, but these errors were encountered: