rack / rackup

MIT License
44 stars 12 forks source link

1.0.1 breaks puma bootup with NoMethodError for `register` #22

Closed rmehner closed 3 weeks ago

rmehner commented 3 weeks ago

When updating rackup to 1.0.1 we suddenly see this upon puma bootup:

NoMethodError:
            undefined method `register' for module Rackup::Handler
          # /home/runner/work/webapp/webapp/vendor/bundle/ruby/3.3.0/gems/puma-6.4.3/lib/rack/handler/puma.rb:126:in `<module:Handler>'
          # /home/runner/work/webapp/webapp/vendor/bundle/ruby/3.3.0/gems/puma-6.4.3/lib/rack/handler/puma.rb:120:in `<module:Rackup>'
          # /home/runner/work/webapp/webapp/vendor/bundle/ruby/3.3.0/gems/puma-6.4.3/lib/rack/handler/puma.rb:119:in `<main>'

Involved versions:

Ruby 3.3.5 Puma 6.4.3

Downgrading to 1.0.0 fixes this issue. Didn't have the time to check updating to a higher version.

Thanks for reading :)

tf commented 3 weeks ago

Related: https://github.com/rack/rackup/issues/19

ioquatix commented 3 weeks ago

See https://github.com/puma/puma/pull/3532 for the fix.

joshgoebel commented 2 weeks ago

@ioquatix I pulled in the new 1.0.1 release, but it's still broken in that now it seems to be missing the register method as shown above. We use Phusion Passneger and i have the same (or equiv) error:

NoMethodError: undefined method `register' for Rackup::Handler:Module (NoMethodError)

      register :passenger, PhusionPassenger
      ^^^^^^^^
/usr/local/bundle/gems/passenger-6.0.23/src/ruby_supportlib/phusion_passenger/rack_handler.rb:57:in `<module:Handler>'
/usr/local/bundle/gems/passenger-6.0.23/src/ruby_supportlib/phusion_passenger/rack_handler.rb:46:in `<module:Rackup>'
/usr/local/bundle/gems/passenger-6.0.23/src/ruby_supportlib/phusion_passenger/rack_handler.rb:45:in `<top (required)>
dentarg commented 2 weeks ago

@joshgoebel report that to Phusion Passenger, the code that fails (see the backtrace) does not belong to this project

joshgoebel commented 2 weeks ago

Where is the following code from 0.2.3:

  module Handler
    @handlers = {}

    # Register a named handler class.
    def self.register(name, klass)

This package used to have the method register that Passenger is calling, but the v1.0.1 release seems to be missing all these files still (looking at tag on github at least)...

joshgoebel commented 2 weeks ago

IE:

https://github.com/rack/rackup/blob/v1.0.1/lib/rackup/handler.rb vs https://github.com/rack/rackup/blob/v0.2.3/lib/rackup/handler.rb

404 not found

Something is still broken here. Where did the handle functionality go?

ioquatix commented 2 weeks ago

Do not use rackup v0.