new rails application stalls at tailwind install/build #531
Replies: 25 comments
-
|
Hi @blairanderson, and what happens if you run this command? If the problem persists, i'd tend to think it's a problem with the tailwindcss-cli executable rather than this gem. Similar issues have been reported in the past (see #499, though I don't think it's exactly your problem). Btw, I tried your command and worked without issues (though on a docker container). |
Beta Was this translation helpful? Give feedback.
-
|
I'm experiencing the same issue after installing it in an existing Rails project. The process gets stuck at: I tried running the command you suggested, but it didn’t work. Do you have any other recommendations? |
Beta Was this translation helpful? Give feedback.
-
|
Hi @brandongs-MP, Unfortunately, your output is not enough for me to tell what might be wrong. If you're running the standalone cli tool by tailwind (the output of running Please refer to this comment. How are you running this command? Are you running on docker? mac? The more info you can share, the better! |
Beta Was this translation helpful? Give feedback.
-
|
I'm facing the same issue as well. I'm running my project on an Apple Silicon M3 Max computer. What exactly is Bun? Why is Tailwind using it? |
Beta Was this translation helpful? Give feedback.
-
|
For anyone having trouble, could you try running https://github.com/rails/tailwindcss-rails/releases/tag/v3.3.1 instead? Tailwind recently moved a big version. Maybe related to that? |
Beta Was this translation helpful? Give feedback.
-
I had to specify that version. |
Beta Was this translation helpful? Give feedback.
-
This didn't work. It stalled |
Beta Was this translation helpful? Give feedback.
-
@dhh @patriciomacadden yes this worked. Gemfile $ rails tailwindcss:build
Rebuilding...
Done in 468ms. |
Beta Was this translation helpful? Give feedback.
-
Tailwind v4's CLI executable is built using Bun (by this, I mean the upstream tailwindlabs/tailwindcss project). @iCueto @blairanderson If v3 is working for you, then this is most likely an issue with the upstream tailwind CLI executable that is being packaged by the If someone who can reproduce this issue would be kind enough to report their experience upstream on the tailwindlabs/tailwindcss project, I'd be very grateful. In the meantime, you may want to stay on |
Beta Was this translation helpful? Give feedback.
-
|
FWIW I also receive a hanging tailwindcss:build on an existing Rails 8.0.2 app. I did I was on tailwindcss-rails 4.2.0, tailwindcss-ruby 4.0.12 and was updated to 4.0.16 and 4.2.1. So something in between there blew it up. |
Beta Was this translation helpful? Give feedback.
-
|
If someone who can reproduce this issue would be kind enough to report their experience upstream on the tailwindlabs/tailwindcss project, I'd be very grateful. In the meantime, you may want to stay on tailwindcss-rails v3.3.1, which pins to Tailwind v3. |
Beta Was this translation helpful? Give feedback.
-
|
Sorry Mike, I forgot to include a "I will go over to the tailwindlabs/tailwindcss project" (was +1 ing it since I think I have a different version, in case that was helpful!) |
Beta Was this translation helpful? Give feedback.
-
|
@flavorjones I have a similar issue with the latest |
Beta Was this translation helpful? Give feedback.
-
|
@octave Thanks for sharing your experience. I'll say it again, though: please report your experience upstream. The only difference between those two versions of tailwindcss-ruby is the executable being packaged, both of which came from the upstream releases. |
Beta Was this translation helpful? Give feedback.
-
|
FWIW in tailwindlabs/tailwindcss#17379 a regex backtracking issue has been identified that's causing hangs for some people. I'm not positive, but I'm hopeful, that this addresses some of what folks are reporting here. |
Beta Was this translation helpful? Give feedback.
-
|
I've packaged up Release v4.0.17 · flavorjones/tailwindcss-ruby, please give it a go and see if it addresses your issue! |
Beta Was this translation helpful? Give feedback.
-
|
Verified fixed on my end!!! Thank you for the quickness! 🥇 |
Beta Was this translation helpful? Give feedback.
-
|
@flavorjones Still having the issue on Rails 8.0.2 after upgrading to 4.0.17 Dev enviroment: MacBook Pro - Apple M1 (2020) - 15.3.2 (24D81) Gemfile % cat Gemfile.lock | grep tailwindcss % bin/rails tailwindcss:buildbun -v I have bun 1.2.6 but tailwindcss:build uses 1.2.4. Maybe related? |
Beta Was this translation helpful? Give feedback.
-
|
@leoplct Sorry you're still having issues. If you are seeing some sort of Bun error message, then you should report that upstream to tailwindlabs/tailwindcss, along with your hardware information. Bun is what's used by tailwindlabs/tailwindcss to build the binary executable CLI, which is what is packaged up by tailwindcss-ruby and used by this gem. If there's a hardware issue then they need to know about it in order to address it, and opening an issue may get their attention. |
Beta Was this translation helpful? Give feedback.
-
|
I solved by downgrading and installing again Downgrading
Installing again Upgrading |
Beta Was this translation helpful? Give feedback.
-
|
@flavorjones that's it! Works for me too! Thank you for being always so fast! |
Beta Was this translation helpful? Give feedback.
-
|
Hi @flavorjones, same as @leoplct I'm having the issue on a Macbook M1 OS Ventura with a fresh install of Rails 8.0.2. bundle exec which tailwindcss
> /Users/user/.asdf/installs/ruby/3.3.6/bin/tailwindcss
bundle exec tailwindcss --help
> ["/Users/user/.asdf/installs/ruby/3.3.6/lib/ruby/gems/3.3.0/gems/tailwindcss-ruby-4.0.17-x86_64-darwin/exe/x86_64-darwin/tailwindcss", "--help"]
> hanging forever |
Beta Was this translation helpful? Give feedback.
-
|
@niconisoria Please see my response above and report it upstream. |
Beta Was this translation helpful? Give feedback.
-
|
I've also updated the README with additional troubleshooting information, and a note that there's a known issue when using I don't think there's anything else this gem can do to help in this case, so I'm going to convert this issue to a discussion. |
Beta Was this translation helpful? Give feedback.
-
|
Im still seeing this with Ruby 3.3.8 and tailwindcss 4.1 on a rails 7.2.2.1 app. I downgraded tainwindcss to 4.0.7 and it worked fine. I don't have watchman installed so I don think it was that. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
rails new keepalert-app --main --css tailwind --database=postgresql create create Gemfile run bundle install --quiet run bundle exec rails new /Users/blairanderson/dev/keepalert-app --main --css tailwind --database\=postgresql exist remove Gemfile remove Gemfile.lock create README.md create Rakefile create .ruby-version create config.ru create .gitignore create .gitattributes create Gemfile run git init -b main from "." Initialized empty Git repository in /Users/blairanderson/dev/keepalert-app/.git/ create app create app/assets/stylesheets/application.css create app/controllers/application_controller.rb create app/helpers/application_helper.rb create app/jobs/application_job.rb create app/mailers/application_mailer.rb create app/models/application_record.rb create app/views/layouts/application.html.erb create app/views/layouts/mailer.html.erb create app/views/layouts/mailer.text.erb create app/views/pwa/manifest.json.erb create app/views/pwa/service-worker.js create app/assets/images create app/assets/images/.keep create app/controllers/concerns/.keep create app/models/concerns/.keep create bin create bin/brakeman create bin/dev create bin/rails create bin/rake create bin/rubocop create bin/setup create bin/thrust create Dockerfile create .dockerignore create bin/docker-entrypoint create .rubocop.yml create .github/workflows create .github/workflows/ci.yml create .github/dependabot.yml create config create config/routes.rb create config/application.rb create config/environment.rb create config/cable.yml create config/puma.rb create config/storage.yml create config/environments create config/environments/development.rb create config/environments/production.rb create config/environments/test.rb create config/initializers create config/initializers/assets.rb create config/initializers/content_security_policy.rb create config/initializers/cors.rb create config/initializers/filter_parameter_logging.rb create config/initializers/inflections.rb create config/initializers/new_framework_defaults_8_1.rb create config/locales create config/locales/en.yml create config/master.key append .gitignore create config/boot.rb create config/database.yml create db create db/seeds.rb create lib create lib/tasks create lib/tasks/.keep create log create log/.keep create public create public/400.html create public/404.html create public/406-unsupported-browser.html create public/422.html create public/500.html create public/icon.png create public/icon.svg create public/robots.txt create script create script/.keep create tmp create tmp/.keep create tmp/pids create tmp/pids/.keep create vendor create vendor/.keep create test/fixtures/files create test/fixtures/files/.keep create test/controllers create test/controllers/.keep create test/mailers create test/mailers/.keep create test/models create test/models/.keep create test/helpers create test/helpers/.keep create test/integration create test/integration/.keep create test/test_helper.rb create test/system create test/system/.keep create test/application_system_test_case.rb create storage create storage/.keep create tmp/storage create tmp/storage/.keep remove config/initializers/cors.rb remove config/initializers/new_framework_defaults_8_1.rb run bundle install --quiet run bundle lock --add-platform=x86_64-linux Writing lockfile to /Users/blairanderson/dev/keepalert-app/Gemfile.lock run bundle binstubs bundler rails importmap:install apply /Users/blairanderson/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/importmap-rails-2.1.0/lib/install/install.rb Add Importmap include tags in application layout insert app/views/layouts/application.html.erb Create application.js module as entrypoint create app/javascript/application.js Use vendor/javascript for downloaded pins create vendor/javascript create vendor/javascript/.keep Configure importmap paths in config/importmap.rb create config/importmap.rb Copying binstub create bin/importmap run bundle install --quiet rails turbo:install stimulus:install apply /Users/blairanderson/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/turbo-rails-2.0.13/lib/install/turbo_with_importmap.rb Import Turbo append app/javascript/application.js Pin Turbo append config/importmap.rb run bundle install --quiet apply /Users/blairanderson/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/stimulus-rails-1.3.4/lib/install/stimulus_with_importmap.rb Create controllers directory create app/javascript/controllers create app/javascript/controllers/index.js create app/javascript/controllers/application.js create app/javascript/controllers/hello_controller.js Import Stimulus controllers append app/javascript/application.js Pin Stimulus Appending: pin "@hotwired/stimulus", to: "stimulus.min.js" append config/importmap.rb Appending: pin "@hotwired/stimulus-loading", to: "stimulus-loading.js" append config/importmap.rb Pin all controllers Appending: pin_all_from "app/javascript/controllers", under: "controllers" append config/importmap.rb run bundle install --quiet rails tailwindcss:install apply /Users/blairanderson/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/tailwindcss-rails-4.2.0/lib/install/install_tailwindcss.rb Add Tailwindcss container element in application layout insert app/views/layouts/application.html.erb insert app/views/layouts/application.html.erb Build into app/assets/builds create app/assets/builds create app/assets/builds/.keep append .gitignore Add default /Users/blairanderson/dev/keepalert-app/app/assets/tailwind/application.css create app/assets/tailwind/application.css Add default Procfile.dev create Procfile.dev Ensure foreman is installed run gem install foreman from "." Fetching foreman-0.88.1.gem Successfully installed foreman-0.88.1 1 gem installed Add bin/dev to start foreman force bin/dev Compile initial Tailwind build run rails tailwindcss:build from "." ============================================================ Bun v1.2.3 (8c4d3ff8) macOS x64 macOS v15.1.1 CPU: sse42 popcnt Args: Features: no_avx2 no_avxsits there forever.
control+c to break:
running install again gets to build step and freezes:
$ rails tailwindcss:install apply /Users/blairanderson/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/tailwindcss-rails-4.2.0/lib/install/install_tailwindcss.rb Add Tailwindcss container element in application layout Build into app/assets/builds exist app/assets/builds identical app/assets/builds/.keep unchanged .gitignore unchanged Procfile.dev Add bin/dev to start foreman identical bin/dev Compile initial Tailwind build run rails tailwindcss:build from "." ============================================================ Bun v1.2.3 (8c4d3ff8) macOS x64 macOS v15.1.1 CPU: sse42 popcnt Args: Features: no_avx2 no_avxrunning VERBOSE doesn't do much:
Beta Was this translation helpful? Give feedback.
All reactions