debug
debug copied to clipboard
Error when trying to start debug in a Rails app on Ruby 3.0.1
It seems reline tries to use fiddle but doesn't define as dependency, so it is not setup in the bundler environment.
$ rdbg --command --open --sock-path=/home/spin/.ruby-debug-sock/ruby-debug-spin-84464 -- bin/rails server
DEBUGGER: can not load newer irb for coloring. Write 'gem "debug" in your Gemfile.
DEBUGGER: Session start (pid: 84513)
DEBUGGER: Debugger can attach via UNIX domain socket (/home/spin/.ruby-debug-sock/ruby-debug-spin-84464)
DEBUGGER: wait for debugger connection...
DEBUGGER: Connected.
DEBUGGER: Disconnected.
/usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require': cannot load such file -- fiddle (LoadError)
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:89:in `register'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:44:in `require'
from /usr/local/bundle/gems/zeitwerk-2.5.0.beta3/lib/zeitwerk/kernel.rb:35:in `require'
from /usr/local/bundle/gems/reline-0.2.7/lib/reline/terminfo.rb:1:in `<main>'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
from /usr/local/bundle/gems/zeitwerk-2.5.0.beta3/lib/zeitwerk/kernel.rb:35:in `require'
from /usr/local/bundle/gems/reline-0.2.7/lib/reline.rb:10:in `<main>'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
from /usr/local/bundle/gems/zeitwerk-2.5.0.beta3/lib/zeitwerk/kernel.rb:35:in `require'
from /usr/local/bundle/gems/irb-1.3.7/lib/irb.rb:13:in `<main>'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
from /usr/local/bundle/gems/zeitwerk-2.5.0.beta3/lib/zeitwerk/kernel.rb:35:in `require'
from /usr/local/bundle/gems/byebug-11.1.3/lib/byebug/commands/irb.rb:4:in `<main>'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
from /usr/local/bundle/gems/zeitwerk-2.5.0.beta3/lib/zeitwerk/kernel.rb:35:in `require'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:54:in `require_relative'
from /usr/local/bundle/gems/byebug-11.1.3/lib/byebug/commands.rb:20:in `<main>'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
from /usr/local/bundle/gems/zeitwerk-2.5.0.beta3/lib/zeitwerk/kernel.rb:35:in `require'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:54:in `require_relative'
from /usr/local/bundle/gems/byebug-11.1.3/lib/byebug/core.rb:10:in `<main>'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
from /usr/local/bundle/gems/zeitwerk-2.5.0.beta3/lib/zeitwerk/kernel.rb:35:in `require'
from /usr/local/bundle/gems/pry-byebug-3.9.0/lib/byebug/processors/pry_processor.rb:3:in `<main>'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
from /usr/local/bundle/gems/zeitwerk-2.5.0.beta3/lib/zeitwerk/kernel.rb:35:in `require'
from /usr/local/bundle/gems/pry-byebug-3.9.0/lib/pry-byebug/pry_ext.rb:3:in `<main>'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
from /usr/local/bundle/gems/zeitwerk-2.5.0.beta3/lib/zeitwerk/kernel.rb:35:in `require'
from /usr/local/bundle/gems/pry-byebug-3.9.0/lib/pry-byebug/cli.rb:4:in `<main>'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
from /usr/local/bundle/gems/zeitwerk-2.5.0.beta3/lib/zeitwerk/kernel.rb:35:in `require'
from /usr/local/bundle/gems/pry-0.13.1/lib/pry/plugins.rb:55:in `load_cli_options'
from /usr/local/bundle/gems/pry-0.13.1/lib/pry/cli.rb:40:in `each'
from /usr/local/bundle/gems/pry-0.13.1/lib/pry/cli.rb:40:in `add_plugin_options'
from /usr/local/bundle/gems/pry-0.13.1/lib/pry/cli.rb:134:in `<main>'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
from /usr/local/bundle/gems/zeitwerk-2.5.0.beta3/lib/zeitwerk/kernel.rb:35:in `require'
from /usr/local/bundle/gems/pry-0.13.1/lib/pry.rb:78:in `<main>'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
from /usr/local/bundle/gems/zeitwerk-2.5.0.beta3/lib/zeitwerk/kernel.rb:35:in `require'
from /usr/local/bundle/gems/pry-rails-0.3.9/lib/pry-rails.rb:3:in `<main>'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
from /usr/local/bundle/gems/zeitwerk-2.5.0.beta3/lib/zeitwerk/kernel.rb:35:in `require'
from /usr/local/bundle/gems/bundler-2.2.22/lib/bundler/runtime.rb:66:in `block (2 levels) in require'
from /usr/local/bundle/gems/bundler-2.2.22/lib/bundler/runtime.rb:61:in `each'
from /usr/local/bundle/gems/bundler-2.2.22/lib/bundler/runtime.rb:61:in `block in require'
from /usr/local/bundle/gems/bundler-2.2.22/lib/bundler/runtime.rb:50:in `each'
from /usr/local/bundle/gems/bundler-2.2.22/lib/bundler/runtime.rb:50:in `require'
from /usr/local/bundle/gems/bundler-2.2.22/lib/bundler.rb:174:in `require'
from /src/github.com/shopify/shopify/config/application.rb:32:in `<main>'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
from /usr/local/bundle/gems/zeitwerk-2.5.0.beta3/lib/zeitwerk/kernel.rb:35:in `require'
from /usr/local/bundle/bundler/gems/rails-78e402077d4d/railties/lib/rails/commands/server/server_command.rb:137:in `block in perform'
from <internal:kernel>:90:in `tap'
from /usr/local/bundle/bundler/gems/rails-78e402077d4d/railties/lib/rails/commands/server/server_command.rb:134:in `perform'
from /usr/local/bundle/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
from /usr/local/bundle/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
from /usr/local/bundle/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
from /usr/local/bundle/bundler/gems/rails-78e402077d4d/railties/lib/rails/command/base.rb:87:in `perform'
from /usr/local/bundle/bundler/gems/rails-78e402077d4d/railties/lib/rails/command.rb:48:in `invoke'
from /usr/local/bundle/bundler/gems/rails-78e402077d4d/railties/lib/rails/commands.rb:18:in `<main>'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
from /usr/local/bundle/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
from /src/github.com/shopify/shopify/bin/rails:9:in `<top (required)>'
from /usr/local/bundle/bundler/gems/spring-53d9e17d7f12/lib/spring/client/rails.rb:28:in `load'
from /usr/local/bundle/bundler/gems/spring-53d9e17d7f12/lib/spring/client/rails.rb:28:in `call'
from /usr/local/bundle/bundler/gems/spring-53d9e17d7f12/lib/spring/client/command.rb:7:in `call'
from /usr/local/bundle/bundler/gems/spring-53d9e17d7f12/lib/spring/client.rb:30:in `run'
from /usr/local/bundle/bundler/gems/spring-53d9e17d7f12/bin/spring:49:in `<top (required)>'
from /usr/local/bundle/bundler/gems/spring-53d9e17d7f12/lib/spring/binstub.rb:11:in `load'
from /usr/local/bundle/bundler/gems/spring-53d9e17d7f12/lib/spring/binstub.rb:11:in `<top (required)>'
from /src/github.com/shopify/shopify/bin/spring:24:in `require'
from /src/github.com/shopify/shopify/bin/spring:24:in `<top (required)>'
from bin/rails:3:in `load'
from bin/rails:3:in `<main>'
Thank you for the report. Which ruby version do you use?
ah, 3.0.1 on title. Thank you!
I have also issues with using it in Rails (6.1.4.1) and Ruby 3.0.2.
I included the gem in the Gemfile, like gem "debug"
(so required by default) and then just run a test:
bin/rails t test/models/some_model_test.rb
and this is what I got:
DEBUGGER: Session start (pid: 1541057)
DEBUGGER: Detaching after fork from parent process 1541057
DEBUGGER: Attaching after process 1541057 fork to child process 1541170
Running via Spring preloader in process 1541170
DEBUGGER: Detaching after fork from parent process 1541170
DEBUGGER: Attaching after process 1541170 fork to child process 1541179
Run options: --seed 10304
# Running:
/home/wojtek/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/gems/debug-1.0.0/lib/debug/session.rb:1654:in `waitpid': No child processes (Errno::ECHILD)
from /home/wojtek/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/gems/debug-1.0.0/lib/debug/session.rb:1654:in `block (2 levels) in fork'
from /home/wojtek/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/fork_tracker.rb:8:in `fork'
from /home/wojtek/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/fork_tracker.rb:8:in `fork'
from /home/wojtek/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/fork_tracker.rb:27:in `fork'
from /home/wojtek/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/gems/debug-1.0.0/lib/debug/session.rb:1634:in `fork'
from /home/wojtek/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/fork_tracker.rb:8:in `fork'
from /home/wojtek/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/fork_tracker.rb:27:in `fork'
from /home/wojtek/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/testing/parallelization/worker.rb:15:in `start'
from /home/wojtek/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/testing/parallelization.rb:37:in `block in start'
from /home/wojtek/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/testing/parallelization.rb:36:in `times'
from /home/wojtek/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/testing/parallelization.rb:36:in `each'
from /home/wojtek/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/testing/parallelization.rb:36:in `map'
from /home/wojtek/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/testing/parallelization.rb:36:in `start'
from /home/wojtek/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:138:in `run'
from /home/wojtek/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/gems/minitest-5.14.4/lib/minitest.rb:68:in `block in autorun'
from /home/wojtek/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/fork_tracker.rb:8:in `fork'
from /home/wojtek/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/fork_tracker.rb:8:in `fork'
from /home/wojtek/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/fork_tracker.rb:27:in `fork'
from /home/wojtek/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/gems/debug-1.0.0/lib/debug/session.rb:1669:in `fork'
from /home/wojtek/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/fork_tracker.rb:8:in `fork'
from /home/wojtek/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/fork_tracker.rb:27:in `fork'
from /home/wojtek/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/gems/spring-2.1.1/lib/spring/application.rb:180:in `serve'
from /home/wojtek/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/gems/spring-2.1.1/lib/spring/application.rb:145:in `block in run'
from /home/wojtek/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/gems/spring-2.1.1/lib/spring/application.rb:139:in `loop'
from /home/wojtek/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/gems/spring-2.1.1/lib/spring/application.rb:139:in `run'
from /home/wojtek/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/gems/spring-2.1.1/lib/spring/application/boot.rb:19:in `<top (required)>'
from <internal:/home/wojtek/.asdf/installs/ruby/3.0.2/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:/home/wojtek/.asdf/installs/ruby/3.0.2/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from -e:1:in `<main>'
@morgoth I think the cause of your issue is different from @rafaelfranca's (which I've opened an issue to confirm: https://github.com/ruby/reline/issues/344). Yours seems to be caused by the debugger's fork process handling + Spring (perhaps related to https://github.com/ruby/debug/issues/208?). I think you can temporarily avoid the issue by stopping Spring.
@rafaelfranca Does deleting bootsnap's cache not help?
@st0012 I had the same issue as @morgoth. After commenting out parallelize(workers: :number_of_processors)
in test_helper.rb
I don't see the error.
@morgoth @mibradev I think the issue may have been fixed by https://github.com/ruby/debug/pull/280. can you give the latest master a try?
@st0012 Thanks, you are the best. I confirm it fixed the issue.
Seeing the same issue with Spring and the waitpid error. When running without spring (but with bootsnap) it works. So seems like there's some interaction there that isn't right.
@dhh have you tried the current master? that'll help us verify if it's the same issue.
This is now fixed in main! But now I'm seeing this debug output on every test run under spring in Rails:
DEBUGGER: Detaching after fork from parent process 17625
DEBUGGER: Attaching after process 17625 fork to child process 17658
Not a huge deal, but also not something that's helpful, imo.
Does Bootsnap or Spring need to add default gems of Ruby to the dependencies list of a library that a Rails application needs? In this case, "a library" is reline gem via debug gem, and "default gem" is fiddle gem.
I’m still seeing the same error as @rafaelfranca with Ruby 3.0.3, Rails 7, Ubuntu 20.04.2 LTS.
I disabled bootsnap by commenting out the require in config/boot.rb which just gives a more condensed error but the same initial error. I also tested this out against the latest on debug’s master and still seeing the issue.
/home/nick/.rubies/ruby-3.0.3/lib/ruby/3.0.0/fiddle.rb:3:in `require': libffi.so.8: cannot open shared object file: No such file or directory - /home/nick/.rubies/ruby-3.0.3/lib/ruby/3.0.0/x86_64-linux/fiddle.so (LoadError)
from /home/nick/.rubies/ruby-3.0.3/lib/ruby/3.0.0/fiddle.rb:3:in `<top (required)>'
from /home/nick/.gem/ruby/3.0.3/gems/reline-0.2.7/lib/reline/terminfo.rb:1:in `require'
from /home/nick/.gem/ruby/3.0.3/gems/reline-0.2.7/lib/reline/terminfo.rb:1:in `<top (required)>'
from /home/nick/.gem/ruby/3.0.3/gems/reline-0.2.7/lib/reline.rb:10:in `require'
from /home/nick/.gem/ruby/3.0.3/gems/reline-0.2.7/lib/reline.rb:10:in `<top (required)>'
from /home/nick/.gem/ruby/3.0.3/gems/irb-1.3.7/lib/irb.rb:13:in `require'
from /home/nick/.gem/ruby/3.0.3/gems/irb-1.3.7/lib/irb.rb:13:in `<top (required)>'
from /home/nick/.gem/ruby/3.0.3/gems/railties-7.0.0/lib/rails/commands/console/console_command.rb:3:in `require'
from /home/nick/.gem/ruby/3.0.3/gems/railties-7.0.0/lib/rails/commands/console/console_command.rb:3:in `<top (required)>'
from /home/nick/.gem/ruby/3.0.3/gems/railties-7.0.0/lib/rails/command/behavior.rb:44:in `require'
from /home/nick/.gem/ruby/3.0.3/gems/railties-7.0.0/lib/rails/command/behavior.rb:44:in `block (2 levels) in lookup'
from /home/nick/.gem/ruby/3.0.3/gems/railties-7.0.0/lib/rails/command/behavior.rb:40:in `each'
from /home/nick/.gem/ruby/3.0.3/gems/railties-7.0.0/lib/rails/command/behavior.rb:40:in `block in lookup'
from /home/nick/.gem/ruby/3.0.3/gems/railties-7.0.0/lib/rails/command/behavior.rb:39:in `each'
from /home/nick/.gem/ruby/3.0.3/gems/railties-7.0.0/lib/rails/command/behavior.rb:39:in `lookup'
from /home/nick/.gem/ruby/3.0.3/gems/railties-7.0.0/lib/rails/command.rb:73:in `find_by_namespace'
from /home/nick/.gem/ruby/3.0.3/gems/railties-7.0.0/lib/rails/command.rb:46:in `invoke'
from /home/nick/.gem/ruby/3.0.3/gems/railties-7.0.0/lib/rails/commands.rb:18:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
There’s also https://github.com/ruby/reline/pull/378 and https://github.com/ruby/reline/issues/344 that seem to be related. Those reline issues are still in a pre release though and not a general release it looks like. Using reline master seems to resolve the issue as well:
gem "reline", github: "ruby/reline", branch: :master
I was able to resolve this issue with a fresh install of Ubuntu 20 LTS and installing build-essential and gcc. I was previously encountering this issue utilizing a server where it'd been upgraded from 16 to 20 LTS so I'd guess there was something in the upgrade process that probably needed to be rebuilt.