When working with the puma plugin, another issue could occur. Potentially, this issue is resolved together with #241. The issue is that pruning the bundler environment together with a on_restart directive causes issues with Gem::Specification.reset:
=> Booting Puma
=> Rails 7.1.3.4 application starting in development
=> Run `bin/rails server --help` for more startup options
[69212] * Pruning Bundler environment
[69212] Puma starting in cluster mode...
[69212] * Puma version: 6.4.2 (ruby 3.3.2-p78) ("The Eagle of Durango")
[69212] * Min threads: 5
[69212] * Max threads: 5
[69212] * Environment: development
[69212] * Master PID: 69212
[69212] * Workers: 10
[69212] * Restarts: (✔) hot (✔) phased
[69212] * Listening on http://0.0.0.0:3000
[69212] Use Ctrl-C to stop
[69212] + Gemfile in context: /solid_queue/Gemfile
WARN: Unresolved or ambiguous specs during Gem::Specification.reset:
drb (>= 0)
Available/installed versions of this gem:
- 2.2.1
- 2.2.0
bigdecimal (>= 0)
Available/installed versions of this gem:
- 3.1.8
- 3.1.5
irb (>= 0)
Available/installed versions of this gem:
- 1.13.1
- 1.11.0
WARN: Clearing out unresolved specs. Try 'gem cleanup <gem>'
Please report a bug if this causes problems.
[69212] - Worker 0 (PID: 69215) booted in 1.0s, phase: 0
I tested multiple combinations, but adding Solid Queue together with the puma plugin and configuring on_restart was the only combination this error occurred. As soon as either the gem or the on_restart is removed, no warning is issued.
Steps to reproduce:
Create a new Rails app: rails new "solid_queue" -T --api --no-tests
Add the gem to the Gemfile gem "solid_queue"
Run bundle install
Install with rails generate solid_queue:install
Migrate with rails db:migrate
Modify the puma.rb config:
a. Configure workers to be used, i.e. workers 2
b. Add prune_bundler
c. Add an (empty) block for restarts: on_restart {}
When working with the puma plugin, another issue could occur. Potentially, this issue is resolved together with #241. The issue is that pruning the bundler environment together with a
on_restart
directive causes issues withGem::Specification.reset
:I tested multiple combinations, but adding Solid Queue together with the puma plugin and configuring
on_restart
was the only combination this error occurred. As soon as either the gem or theon_restart
is removed, no warning is issued.Steps to reproduce:
rails new "solid_queue" -T --api --no-tests
gem "solid_queue"
bundle install
rails generate solid_queue:install
rails db:migrate
puma.rb
config: a. Configureworkers
to be used, i.e.workers 2
b. Addprune_bundler
c. Add an (empty) block for restarts:on_restart {}
rails s
Ruby: 3.3.2 +YJIT Rails: 7.1.3.4 Puma: 6.4.2 Solid Queue: 0.3.3