You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+34-1
Original file line number
Diff line number
Diff line change
@@ -403,30 +403,63 @@ If you need to use a custom input or output file, you can run `bundle exec tailw
403
403
404
404
## Troubleshooting
405
405
406
-
Some common problems experienced by users ...
406
+
When having trouble with `tailwindcss:build` or `tailwindcss:watch`, the first thing you should do is collect some diagnostic information by setting the "verbose" flag, which will emit:
407
+
408
+
1. the command being run (so you can try running `tailwindcss` yourself without the gem's help)
409
+
2. additional debugging output from `tailwindcss` by setting the env var `DEBUG=1`
There is a [known issue](https://github.com/tailwindlabs/tailwindcss/issues/17246#issuecomment-2753067488) running `tailwindcss -w` (that's the CLI in watch mode) when the utility `watchman` is also installed.
432
+
433
+
Please try uninstalling `watchman` and try running the watch task again.
434
+
407
435
408
436
### Lost keystrokes or hanging when using terminal-based debugging tools (e.g. IRB, Pry, `ruby/debug`...etc.) with the Puma plugin
409
437
410
438
We've addressed the issue and you can avoid the problem by upgrading `tailwindcss-rails` to [v2.4.1](https://github.com/rails/tailwindcss-rails/releases/tag/v2.4.1) or later versions.
411
439
440
+
412
441
### Running in a docker container exits prematurely
413
442
414
443
If you are running `rails tailwindcss:watch` as a process in a Docker container, set `tty: true` in `docker-compose.yml` for the appropriate container to keep the watch process running.
415
444
416
445
If you are running `rails tailwindcss:watch` in a docker container without a tty, pass the `always` argument to the task to instruct tailwindcss to keep the watcher alive even when `stdin` is closed: `rails tailwindcss:watch[always]`. If you use `bin/dev` then you should modify your `Procfile.dev`.
417
446
447
+
418
448
### Conflict with sassc-rails
419
449
420
450
Tailwind uses modern CSS features that are not recognized by the `sassc-rails` extension that was included by default in the Gemfile for Rails 6. In order to avoid any errors like `SassC::SyntaxError`, you must remove that gem from your Gemfile.
421
451
452
+
422
453
### Class names must be spelled out
423
454
424
455
For Tailwind to work, your class names need to be spelled out. If you need to make sure Tailwind generates class names that don't exist in your content files or that are programmatically composed, use the [safelist option](https://tailwindcss.com/docs/content-configuration#safelisting-classes).
425
456
457
+
426
458
### `ERROR: Cannot find the tailwindcss executable` for supported platform
427
459
428
460
See https://github.com/flavorjones/tailwindcss-ruby for help.
429
461
462
+
430
463
### Using asset-pipeline assets
431
464
432
465
In Rails, you want to use [assets from the asset pipeline to get fingerprinting](https://guides.rubyonrails.org/asset_pipeline.html#fingerprinting-versioning-with-digest-based-urls). However, Tailwind isn't aware of those assets.
0 commit comments