Skip to content
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

bin/rails tailwindcss:watch not triggering rebuild #217

Closed
ftambara opened this issue Oct 30, 2022 · 7 comments
Closed

bin/rails tailwindcss:watch not triggering rebuild #217

ftambara opened this issue Oct 30, 2022 · 7 comments

Comments

@ftambara
Copy link

Bug report

Steps to reproduce

  • Install or update to tailwindcss-rails v2.0.15 (also happens with current latest, v2.0.16)
  • run either bin/dev or bin/rails server and bin/rails tailwindcss:watch on separate terminals.

Expected behavior

Tailwind CSS should rebuild stylesheet after every change in files matching any tailwind.config.js module.exports.content patterns.

Actual behavior

Changes are ignored.

System configuration

Rails version: 7.0.4

Ruby version: 3.1.2p20

@flavorjones
Copy link
Member

Hi, @ftambara, sorry you're experiencing problems.

I'm unable to reproduce this issue. In a fresh Rails application running tailwindcss-rails v2.0.16, when I edit config/tailwind.config.js a rebuild is performed, and when I edit public/404.html a rebuild is performed (note that './public/*.html' is present in the config in module.exports.content).

Can you help me reproduce what you're seeing?

@flavorjones
Copy link
Member

flavorjones commented Oct 31, 2022

Can you include information about your system? Are you on a Mac, Linux, Windows, etc.?

Please note there is some activity upstream about the watch functionality which may be related?

@robgough
Copy link

robgough commented Oct 31, 2022

Just to confirm I'm seeing the same problem, using Docker on an M1 Mac (editing via Neovim). Pinning the tailwindcss-rails gem to 2.0.14 seems to resolve the issue. I assume it's related to the upstream activity mentioned above by @flavorjones

@ftambara
Copy link
Author

ftambara commented Nov 1, 2022

Hi @flavorjones. My system runs Debian 11.
It looks like it is indeed the issue you mentioned, since the people that commented there seem to have problems with release 3.2.0, the same that tailwindcss-rails's v2.0.15 updates to.
The cited pull request seems to be on track, so I'll stick to v2.0.14 until it arrives downstream.
Thank you for your time!

@cotelha
Copy link

cotelha commented Nov 2, 2022

I had the same problem using version 2.0.12 in Mac M1, but the tailwindcss-rails gem version 2.0.17 fixed the issue.

@justinperkins
Copy link

FWIW, I was experiencing this issue on 2.0.18 & 2.0.19. Downgrading to 2.0.14 resolved it for me. Running on Docker on an Intel Mac. I fully tore down docker (down -v) and rebuilt (up --build) each time I changed the version.

@flavorjones
Copy link
Member

Fixed in upstream releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants