Closed ShadowCrafter011 closed 7 months ago
Recently I on kida similar problem my application is dockerized when I run bin/dev, the container shutdown. Im using:
Do u find a solution?
@ShadowCrafter011 I can't reproduce this on my machine, can you help me by providing some more information about your system?
I'm running:
ruby -v
: ruby 3.2.3 (2024-01-18 revision 52bb2ac0a6) [x86_64-linux]
rails -v
: Rails 7.1.3
Procfile.dev
and bin/dev
are identical to yoursIs anything obviously different for you?
I also can't reproduce this with the same setup on MacOS ruby 3.2.3 (2024-01-18 revision 52bb2ac0a6) [arm64-darwin23]
Just a followup, in my case adding tty: true
on docker-compose.yml file solve the issue.
find the answer on here
I can reproduce this as well, and it's been like this for my app ever since I first generated it about a year and a half ago 😅
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23] Rails 7.1.2 tailwindcss-rails 2.3.0
My Procfile.dev
:
web: bin/rails server -p 3000
worker: bin/sidekiq -C config/sidekiq.yml
css: bin/rails tailwindcss:watch
My bin/dev
:
#!/usr/bin/env bash
if ! command -v foreman &> /dev/null
then
echo "Installing foreman..."
gem install foreman
fi
foreman start -f Procfile.dev
In fact, I can reproduce this with a fresh Rails application without having to make any changes to it:
$ rails new tailwind_test -c tailwind
# snip
$ cd tailwind_test
$ bin/dev
09:51:56 web.1 | started with pid 79504
09:51:56 css.1 | started with pid 79505
09:51:56 web.1 | => Booting Puma
09:51:56 web.1 | => Rails 7.1.3.2 application starting in development
09:51:56 web.1 | => Run `bin/rails server --help` for more startup options
09:51:56 web.1 | Puma starting in single mode...
09:51:56 web.1 | * Puma version: 6.4.2 (ruby 3.3.0-p0) ("The Eagle of Durango")
09:51:56 web.1 | * Min threads: 5
09:51:56 web.1 | * Max threads: 5
09:51:56 web.1 | * Environment: development
09:51:56 web.1 | * PID: 79504
09:51:56 web.1 | * Listening on http://127.0.0.1:3000
09:51:56 web.1 | * Listening on http://[::1]:3000
09:51:57 web.1 | Use Ctrl-C to stop
09:51:57 css.1 |
09:51:57 css.1 | Rebuilding...
09:51:57 css.1 |
09:51:57 css.1 | Done in 196ms.
^C09:51:59 system | SIGINT received, starting shutdown
09:51:59 css.1 | bin/rails aborted!
09:51:59 web.1 | - Gracefully stopping, waiting for requests to finish
09:51:59 css.1 | Interrupt: Interrupt
09:51:59 web.1 | === puma shutdown: 2024-02-23 09:51:59 -0800 ===
09:51:59 css.1 | /Users/davidcelis/Developer/tailwind_test/vendor/bundle/ruby/3.3.0/gems/tailwindcss-rails-2.3.0-arm64-darwin/lib/tasks/build.rake:17:in `system'
09:51:59 web.1 | - Goodbye!
09:51:59 css.1 | /Users/davidcelis/Developer/tailwind_test/vendor/bundle/ruby/3.3.0/gems/tailwindcss-rails-2.3.0-arm64-darwin/lib/tasks/build.rake:17:in `block (2 levels) in <main>'
09:51:59 web.1 | Exiting
09:51:59 css.1 | /Users/davidcelis/Developer/tailwind_test/vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/lib/rake/task.rb:281:in `block in execute'
09:51:59 css.1 | /Users/davidcelis/Developer/tailwind_test/vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/lib/rake/task.rb:281:in `each'
09:51:59 css.1 | /Users/davidcelis/Developer/tailwind_test/vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/lib/rake/task.rb:281:in `execute'
09:51:59 css.1 | /Users/davidcelis/Developer/tailwind_test/vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
09:51:59 css.1 | /Users/davidcelis/Developer/tailwind_test/vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/lib/rake/task.rb:199:in `synchronize'
09:51:59 css.1 | /Users/davidcelis/Developer/tailwind_test/vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/lib/rake/task.rb:199:in `invoke_with_call_chain'
09:51:59 css.1 | /Users/davidcelis/Developer/tailwind_test/vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/lib/rake/task.rb:188:in `invoke'
09:51:59 css.1 | /Users/davidcelis/Developer/tailwind_test/vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/lib/rake/application.rb:182:in `invoke_task'
09:51:59 css.1 | /Users/davidcelis/Developer/tailwind_test/vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/lib/rake/application.rb:138:in `block (2 levels) in top_level'
09:51:59 css.1 | /Users/davidcelis/Developer/tailwind_test/vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/lib/rake/application.rb:138:in `each'
09:51:59 css.1 | /Users/davidcelis/Developer/tailwind_test/vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/lib/rake/application.rb:138:in `block in top_level'
09:51:59 css.1 | /Users/davidcelis/Developer/tailwind_test/vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/lib/rake/application.rb:147:in `run_with_threads'
09:51:59 css.1 | /Users/davidcelis/Developer/tailwind_test/vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/lib/rake/application.rb:132:in `top_level'
09:51:59 css.1 | /Users/davidcelis/Developer/tailwind_test/vendor/bundle/ruby/3.3.0/gems/railties-7.1.3.2/lib/rails/commands/rake/rake_command.rb:27:in `block (2 levels) in perform'
09:51:59 css.1 | /Users/davidcelis/Developer/tailwind_test/vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/lib/rake/application.rb:208:in `standard_exception_handling'
09:51:59 css.1 | /Users/davidcelis/Developer/tailwind_test/vendor/bundle/ruby/3.3.0/gems/railties-7.1.3.2/lib/rails/commands/rake/rake_command.rb:27:in `block in perform'
09:51:59 css.1 | /Users/davidcelis/Developer/tailwind_test/vendor/bundle/ruby/3.3.0/gems/railties-7.1.3.2/lib/rails/commands/rake/rake_command.rb:44:in `block in with_rake'
09:51:59 css.1 | /Users/davidcelis/Developer/tailwind_test/vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/lib/rake/rake_module.rb:59:in `with_application'
09:51:59 css.1 | /Users/davidcelis/Developer/tailwind_test/vendor/bundle/ruby/3.3.0/gems/railties-7.1.3.2/lib/rails/commands/rake/rake_command.rb:41:in `with_rake'
09:51:59 css.1 | /Users/davidcelis/Developer/tailwind_test/vendor/bundle/ruby/3.3.0/gems/railties-7.1.3.2/lib/rails/commands/rake/rake_command.rb:20:in `perform'
09:51:59 css.1 | /Users/davidcelis/Developer/tailwind_test/vendor/bundle/ruby/3.3.0/gems/railties-7.1.3.2/lib/rails/command.rb:156:in `invoke_rake'
09:51:59 css.1 | /Users/davidcelis/Developer/tailwind_test/vendor/bundle/ruby/3.3.0/gems/railties-7.1.3.2/lib/rails/command.rb:73:in `block in invoke'
09:51:59 css.1 | /Users/davidcelis/Developer/tailwind_test/vendor/bundle/ruby/3.3.0/gems/railties-7.1.3.2/lib/rails/command.rb:149:in `with_argv'
09:51:59 css.1 | /Users/davidcelis/Developer/tailwind_test/vendor/bundle/ruby/3.3.0/gems/railties-7.1.3.2/lib/rails/command.rb:69:in `invoke'
09:51:59 css.1 | /Users/davidcelis/Developer/tailwind_test/vendor/bundle/ruby/3.3.0/gems/railties-7.1.3.2/lib/rails/commands.rb:18:in `<main>'
09:51:59 css.1 | /Users/davidcelis/Developer/tailwind_test/vendor/bundle/ruby/3.3.0/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
09:51:59 css.1 | Tasks: TOP => tailwindcss:watch
09:51:59 css.1 | (See full trace by running task with --trace)
09:52:00 system | sending SIGTERM to all processes
09:52:00 web.1 | exited with code 0
09:52:00 css.1 | exited with code 1
@davidcelis I know you're trying to help, so thank you. But without new information I can't reproduce this on my system, with either Ruby 3.2.3 or Ruby 3.3.0.
Can you help me by describing what's different about your system/setup/versions/dependencies? If you can provide more information that would be incredibly helpful.
In your bin/dev
output, though, I do see an Interrupt: Interrupt
exception right there after you ^C
to kill the server. Is it possible that you have some kind of configuration that's hiding the backtrace itself?
Is it possible that you have some kind of configuration that's hiding the backtrace itself?
Not that I am aware of.
I installed tailwindcss-rails into one of my existing projects and am currently trying to switch everything over. I currently have the issue that everytime I press
ctrl + c
to stop the webservertailwindcss:watch
throws an exception. I run the command with the--trace
argument so I'm not sure if the error I receive is intended stop behaviour.The trace is:
My Procfile.dev:
bin/dev: