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

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

Open
2 of 7 tasks
GhaniyKie opened this issue Nov 3, 2023 · 4 comments
Open
2 of 7 tasks

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

GhaniyKie opened this issue Nov 3, 2023 · 4 comments
Milestone

Comments

@GhaniyKie
Copy link

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.

@cesc1989
Copy link

cesc1989 commented Jan 18, 2024

I'm getting this same issue:

  • Macos chip M1. Ventura 13.2.1
  • ruby 3.1.0p0
  • Phusion Passenger(R) 6.0.19

EDIT

Even down to version 6.0.0 or even 5.3.7

@AlexVPopov
Copy link

AlexVPopov commented Apr 4, 2024

I'm getting this on Ruby 3.2, Rails 7.1 and latest Passenger 6.0.20.

@emilsosa
Copy link

emilsosa commented May 9, 2024

Any update on this?

@CamJN
Copy link
Contributor

CamJN commented May 9, 2024

Yes, I've investigated this, and unfortunately it won't be fixable in the upcoming release. It'll have to wait for the one after that. The situation is that recent rack versions now require us to depend on both the rack and rackup gems. However, the rackup gem requires ruby 2.4 and we have to support Ruby 2.0 until June when CentOS 7 goes EOL. The last piece of the puzzle is that rubygems & bundler do not allow a gem to have conditional dependencies so we can't exclude rackup on earlier rubies. It's a really unfortunate situation.

@CamJN CamJN modified the milestones: 6.0.20, 6.0.22 May 17, 2024
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

5 participants