fix: tailwind watcher wasn't running

This commit is contained in:
2026-08-13 16:57:53 -04:00
parent 6e7f8dafd1
commit f84131d65f

View File

@@ -667,6 +667,13 @@ start_rails() {
local login_hint="${1:-}" url_note="${2:-}" local login_hint="${1:-}" url_note="${2:-}"
_spawn app /workspace/repo "bin/rails server -b 0.0.0.0 -p 3000" _spawn app /workspace/repo "bin/rails server -b 0.0.0.0 -p 3000"
printf " ${YELLOW}\xe2\x96\xb6${RESET} starting Rails (puma)\xe2\x80\xa6\n" printf " ${YELLOW}\xe2\x96\xb6${RESET} starting Rails (puma)\xe2\x80\xa6\n"
# Repos built on tailwindcss-rails need the watcher running too, or their
# compiled app/assets/builds/application.css never gets generated and Propshaft
# silently falls back to serving an unrelated same-named stylesheet instead.
if [ -d /workspace/repo/app/assets/tailwind ]; then
_spawn css /workspace/repo "bin/rails tailwindcss:watch"
printf " ${YELLOW}\xe2\x96\xb6${RESET} starting Tailwind CSS watcher\xe2\x80\xa6\n"
fi
printf " ${GRAY}\xe2\x8f\xb3 waiting for the app to come up\xe2\x80\xa6${RESET}\n" printf " ${GRAY}\xe2\x8f\xb3 waiting for the app to come up\xe2\x80\xa6${RESET}\n"
if _wait_tcp 3000; then if _wait_tcp 3000; then
printf " ${YELLOW}\xe2\x9c\x85 app is up${RESET}\n" printf " ${YELLOW}\xe2\x9c\x85 app is up${RESET}\n"