Skip to content

Uninitialized constant Rackup::Handler::Rack (NameError) [Rack 3]ย #2508

Open
@GhaniyKie

Description

Issue report

Are you sure this is a bug in Passenger?
Yes, i sure this from Passenger.

Please try with the newest version of Passenger to avoid issues that have already been fixed
My Gemfile has already pointing to the latest Passenger gem

Question 1: What is the problem?
I actually install this gem to my fresh Rails application, since i wanna change it's default development Web Server from Puma to Passenger. rails s, passenger start, or rails c command return this error:

Rack::Handler is deprecated and replaced by Rackup::Handler
/home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/passenger-6.0.18/src/ruby_supportlib/phusion_passenger/rack_handler.rb:96: warning: Calling Rackup::Handler.register with a string is deprecated, use the class/module itself.
/home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rackup-2.1.0/lib/rackup/handler.rb:22:in `const_get': uninitialized constant Rackup::Handler::Rack (NameError)

        klass = self.const_get(klass, false)
                    ^^^^^^^^^^
Did you mean?  Racc
        from /home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rackup-2.1.0/lib/rackup/handler.rb:22:in `register'
        from /home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/passenger-6.0.18/src/ruby_supportlib/phusion_passenger/rack_handler.rb:96:in `<module:Handler>'
        from /home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/passenger-6.0.18/src/ruby_supportlib/phusion_passenger/rack_handler.rb:40:in `<module:Rack>'
        from /home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/passenger-6.0.18/src/ruby_supportlib/phusion_passenger/rack_handler.rb:39:in `<main>'
        from <internal:/home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from <internal:/home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from /home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in `require'
        from /home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.21/lib/bundler/runtime.rb:60:in `block (2 levels) in require'
        from /home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.21/lib/bundler/runtime.rb:55:in `each'
        from /home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.21/lib/bundler/runtime.rb:55:in `block in require'
        from /home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.21/lib/bundler/runtime.rb:44:in `each'
        from /home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.21/lib/bundler/runtime.rb:44:in `require'
        from /home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bundler-2.4.21/lib/bundler.rb:187:in `require'
        from /home/kaanoy/app/config/application.rb:7:in `<main>'
        from <internal:/home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from <internal:/home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from /home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from /home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.1.1/lib/rails/commands/server/server_command.rb:139:in `block in perform'
        from <internal:kernel>:90:in `tap'
        from /home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.1.1/lib/rails/commands/server/server_command.rb:136:in `perform'
        from /home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/thor-1.3.0/lib/thor/command.rb:28:in `run'
        from /home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/thor-1.3.0/lib/thor/invocation.rb:127:in `invoke_command'
        from /home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.1.1/lib/rails/command/base.rb:178:in `invoke_command'
        from /home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/thor-1.3.0/lib/thor.rb:527:in `dispatch'
        from /home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.1.1/lib/rails/command/base.rb:73:in `perform'
        from /home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.1.1/lib/rails/command.rb:71:in `block in invoke'
        from /home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.1.1/lib/rails/command.rb:149:in `with_argv'
        from /home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.1.1/lib/rails/command.rb:69:in `invoke'
        from /home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/railties-7.1.1/lib/rails/commands.rb:18:in `<main>'
        from <internal:/home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from <internal:/home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
        from /home/kaanoy/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
        from bin/rails:4:in `<main>'

Question 2: Passenger version and integration mode:
Passenger Gem v6.0.18 Standalone

Question 3: OS or Linux distro, platform (including version):
WSL2 Linux (Ubuntu-22.04)

Question 4: Passenger installation method:

  • RubyGems + Gemfile
  • RubyGems, no Gemfile
  • Phusion APT repo
  • Phusion YUM repo
  • OS X Homebrew
  • source tarball
  • Other, please specify:

Question 5: Your app's programming language (including any version managers) and framework (including versions):

  • Rbenv 1.2.0-70-g4fec76f
  • Ruby 3.2.2
  • Rails 7.1.1
  • Bundler v2.4.21

Question 6: Are you using a PaaS and/or containerization? If so which one?
No

Question 7: Anything else about your setup that we should know?
Nope.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions