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

Error with Rack prevents editing rails production credentials #2533

Open
1 of 7 tasks
yupswing opened this issue Mar 19, 2024 · 0 comments
Open
1 of 7 tasks

Error with Rack prevents editing rails production credentials #2533

yupswing opened this issue Mar 19, 2024 · 0 comments

Comments

@yupswing
Copy link

Question 1: What is the problem?
When executing rails credentials:edit on a production environment I get an error related to passenger.
(no problem when editing development environment)
I suspect this could happen also in production environment where I use passenger. (I am using Puma locally)
This is preventing an upgrade to rails 7.1 and from secrets to credentials (as secrets are now deprecated)

Log

$ rails credentials:edit --environment production
Rack::Handler is deprecated and replaced by Rackup::Handler
/home/myuser/dev/my-project/vendor/bundle/ruby/3.3.0/gems/passenger-6.0.20/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/myuser/dev/my-project/vendor/bundle/ruby/3.3.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/myuser/dev/my-project/vendor/bundle/ruby/3.3.0/gems/rackup-2.1.0/lib/rackup/handler.rb:22:in `register'
	from /home/myuser/dev/my-project/vendor/bundle/ruby/3.3.0/gems/passenger-6.0.20/src/ruby_supportlib/phusion_passenger/rack_handler.rb:96:in `<module:Handler>'
	from /home/myuser/dev/my-project/vendor/bundle/ruby/3.3.0/gems/passenger-6.0.20/src/ruby_supportlib/phusion_passenger/rack_handler.rb:40:in `<module:Rack>'
	from /home/myuser/dev/my-project/vendor/bundle/ruby/3.3.0/gems/passenger-6.0.20/src/ruby_supportlib/phusion_passenger/rack_handler.rb:39:in `<main>'
	from <internal:/home/myuser/.rbenv/versions/3.3.0/lib/ruby/site_ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
	from <internal:/home/myuser/.rbenv/versions/3.3.0/lib/ruby/site_ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
	from /home/myuser/.rbenv/versions/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
	from /home/myuser/dev/my-project/vendor/bundle/ruby/3.3.0/gems/zeitwerk-2.6.13/lib/zeitwerk/kernel.rb:34:in `require'
	from /home/myuser/.rbenv/versions/3.3.0/lib/ruby/site_ruby/3.3.0/bundler/runtime.rb:60:in `block (2 levels) in require'
	from /home/myuser/.rbenv/versions/3.3.0/lib/ruby/site_ruby/3.3.0/bundler/runtime.rb:55:in `each'
	from /home/myuser/.rbenv/versions/3.3.0/lib/ruby/site_ruby/3.3.0/bundler/runtime.rb:55:in `block in require'
	from /home/myuser/.rbenv/versions/3.3.0/lib/ruby/site_ruby/3.3.0/bundler/runtime.rb:44:in `each'
	from /home/myuser/.rbenv/versions/3.3.0/lib/ruby/site_ruby/3.3.0/bundler/runtime.rb:44:in `require'
	from /home/myuser/.rbenv/versions/3.3.0/lib/ruby/site_ruby/3.3.0/bundler.rb:187:in `require'
	from /home/myuser/dev/my-project/config/application.rb:23:in `<main>'
	from /home/myuser/.rbenv/versions/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
	from /home/myuser/.rbenv/versions/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
	from /home/myuser/dev/my-project/vendor/bundle/ruby/3.3.0/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
	from /home/myuser/dev/my-project/vendor/bundle/ruby/3.3.0/gems/railties-7.1.3.2/lib/rails/command/actions.rb:15:in `require_application!'
	from /home/myuser/dev/my-project/vendor/bundle/ruby/3.3.0/gems/railties-7.1.3.2/lib/rails/command/environment_argument.rb:31:in `require_application!'
	from /home/myuser/dev/my-project/vendor/bundle/ruby/3.3.0/gems/railties-7.1.3.2/lib/rails/command/actions.rb:24:in `load_environment_config!'
	from /home/myuser/dev/my-project/vendor/bundle/ruby/3.3.0/gems/railties-7.1.3.2/lib/rails/commands/credentials/credentials_command.rb:19:in `edit'
	from /home/myuser/dev/my-project/vendor/bundle/ruby/3.3.0/gems/thor-1.3.1/lib/thor/command.rb:28:in `run'
	from /home/myuser/dev/my-project/vendor/bundle/ruby/3.3.0/gems/thor-1.3.1/lib/thor/invocation.rb:127:in `invoke_command'
	from /home/myuser/dev/my-project/vendor/bundle/ruby/3.3.0/gems/railties-7.1.3.2/lib/rails/command/base.rb:178:in `invoke_command'
	from /home/myuser/dev/my-project/vendor/bundle/ruby/3.3.0/gems/thor-1.3.1/lib/thor.rb:527:in `dispatch'
	from /home/myuser/dev/my-project/vendor/bundle/ruby/3.3.0/gems/railties-7.1.3.2/lib/rails/command/base.rb:73:in `perform'
	from /home/myuser/dev/my-project/vendor/bundle/ruby/3.3.0/gems/railties-7.1.3.2/lib/rails/command.rb:71:in `block in invoke'
	from /home/myuser/dev/my-project/vendor/bundle/ruby/3.3.0/gems/railties-7.1.3.2/lib/rails/command.rb:149:in `with_argv'
	from /home/myuser/dev/my-project/vendor/bundle/ruby/3.3.0/gems/railties-7.1.3.2/lib/rails/command.rb:69:in `invoke'
	from /home/myuser/dev/my-project/vendor/bundle/ruby/3.3.0/gems/railties-7.1.3.2/lib/rails/commands.rb:18:in `<main>'
	from /home/myuser/.rbenv/versions/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
	from /home/myuser/.rbenv/versions/3.3.0/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
	from /home/myuser/dev/my-project/vendor/bundle/ruby/3.3.0/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
	from bin/rails:4:in `<main>'

Line 23 of application.rb

Bundler.require(*Rails.groups)

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

Question 3: OS or Linux distro, platform (including version):
Arch Linux 6.7.8

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):
Ruby 3.3.0, rbenv, Rails 7.1.3.2

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

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

1 participant