Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Puma plugin causes warning about unresolved or ambiguous Gem specs #243

Open
MrSerth opened this issue Jun 17, 2024 · 4 comments
Open

Puma plugin causes warning about unresolved or ambiguous Gem specs #243

MrSerth opened this issue Jun 17, 2024 · 4 comments

Comments

@MrSerth
Copy link

MrSerth commented Jun 17, 2024

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:

  1. Create a new Rails app: rails new "solid_queue" -T --api --no-tests
  2. Add the gem to the Gemfile gem "solid_queue"
  3. Run bundle install
  4. Install with rails generate solid_queue:install
  5. Migrate with rails db:migrate
  6. 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 {}
    d. Add the puma plugin with plugin :solid_queue
  7. Start the app regularly through rails s
  8. ⚡️ See the above warning.

Ruby: 3.3.2 +YJIT
Rails: 7.1.3.4
Puma: 6.4.2
Solid Queue: 0.3.3

@rosa
Copy link
Member

rosa commented Jul 30, 2024

Sorry for the delay here, @MrSerth! I'll look into this one very soon.

@rosa
Copy link
Member

rosa commented Aug 24, 2024

Hey @MrSerth, in the end, after some back-and-forth, we're going to remove the Puma plugin completely #303, so I think you could perhaps run Solid Queue separately. I plan to work very soon in proper CLI, not the rake task, so this is easier.

Sorry for the lack of help here! 😳

@rosa rosa closed this as completed Aug 24, 2024
@MrSerth
Copy link
Author

MrSerth commented Aug 25, 2024

Don't worry @rosa, thanks for all the effort you put into Rails and open source software!

@rosa
Copy link
Member

rosa commented Sep 5, 2024

In the end, we're going to keep the Puma plugin, so I'm going to reopen this one! 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants