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

After updating to rails 7 , getting this error #92

Open
farooqch11 opened this issue Mar 14, 2023 · 7 comments
Open

After updating to rails 7 , getting this error #92

farooqch11 opened this issue Mar 14, 2023 · 7 comments

Comments

@farooqch11
Copy link

farooqch11 commented Mar 14, 2023


Users/macbookpro/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/dry-container-0.11.0/lib/dry/container/mixin.rb:155:in `register': undefined method `call' for {:default=>#<Dry::Container::Registry:0x0000000104e2c458 @_mutex=#<Thread::Mutex:0x0000000104e2c368>>}:Hash (NoMethodError)

        config.registry.call(_container, key, item, options)
                       ^^^^^
	from /Users/macbookpro/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/dry-auto_inject-0.9.0/lib/dry/auto_inject/strategies/args.rb:72:in `<class:Strategies>'
	from /Users/macbookpro/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/dry-auto_inject-0.9.0/lib/dry/auto_inject/strategies/args.rb:8:in `<module:AutoInject>'
	from /Users/macbookpro/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/dry-auto_inject-0.9.0/lib/dry/auto_inject/strategies/args.rb:7:in `<module:Dry>'
	from /Users/macbookpro/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/dry-auto_inject-0.9.0/lib/dry/auto_inject/strategies/args.rb:6:in `<top (required)>'
	from /Users/macbookpro/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/dry-auto_inject-0.9.0/lib/dry/auto_inject/strategies.rb:19:in `require'
	from /Users/macbookpro/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/dry-auto_inject-0.9.0/lib/dry/auto_inject/strategies.rb:19:in `<top (required)>'
	from /Users/macbookpro/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/dry-auto_inject-0.9.0/lib/dry/auto_inject/builder.rb:3:in `require'
	from /Users/macbookpro/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/dry-auto_inject-0.9.0/lib/dry/auto_inject/builder.rb:3:in `<top (required)>'
	from /Users/macbookpro/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/dry-auto_inject-0.9.0/lib/dry/auto_inject.rb:3:in `require'
	from /Users/macbookpro/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/dry-auto_inject-0.9.0/lib/dry/auto_inject.rb:3:in `<top (required)>'
	from /Users/macbookpro/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/warden-jwt_auth-0.5.0/lib/warden/jwt_auth.rb:4:in `require'
	from /Users/macbookpro/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/warden-jwt_auth-0.5.0/lib/warden/jwt_auth.rb:4:in `<top (required)>'
	from /Users/macbookpro/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/devise-jwt-0.8.1/lib/devise/jwt.rb:6:in `require'
	from /Users/macbookpro/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/devise-jwt-0.8.1/lib/devise/jwt.rb:6:in `<top (required)>'
	from /Users/macbookpro/Desktop/development/dashboard/config/application.rb:5:in `require'
	from /Users/macbookpro/Desktop/development/dashboard/config/application.rb:5:in `<top (required)>'
	from /Users/macbookpro/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/railties-7.0.4.3/lib/rails/commands/server/server_command.rb:137:in `require'
	from /Users/macbookpro/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/railties-7.0.4.3/lib/rails/commands/server/server_command.rb:137:in `block in perform'
	from <internal:kernel>:90:in `tap'
	from /Users/macbookpro/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/railties-7.0.4.3/lib/rails/commands/server/server_command.rb:134:in `perform'
	from /Users/macbookpro/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
	from /Users/macbookpro/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
	from /Users/macbookpro/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
	from /Users/macbookpro/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/railties-7.0.4.3/lib/rails/command/base.rb:87:in `perform'
	from /Users/macbookpro/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/railties-7.0.4.3/lib/rails/command.rb:48:in `invoke'
	from /Users/macbookpro/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/railties-7.0.4.3/lib/rails/commands.rb:18:in `<top (required)>'
	from bin/rails:4:in `require'
	from bin/rails:4:in `<main>'
  • Ruby version: 3.1.2 , rails 7
@farooqch11 farooqch11 changed the title After updating to rails 7 , getting shi error After updating to rails 7 , getting this error Mar 14, 2023
@solnic
Copy link
Member

solnic commented Mar 14, 2023

Did you update some dry-rb gems at the same time?

@cthulhu666
Copy link
Contributor

cthulhu666 commented Jun 20, 2023

Same issue after upgrading some dry-rb gems:
dry-container (0.8.0) -> dry-container (0.11.0)
dry-core (0.7.1) -> dry-core (0.9.1)
dry-types (1.5.1) -> dry-types (1.6.1)
among others.
Ruby 3.0.6, Rails 6.1

EDIT: Seems to be caused by warden-jwt_auth-0.5.0 gem that it using 'dry/auto_inject',
I'm going to try to update this gem.

@ruchi9876
Copy link

Facing the same issue, any solution?

@timriley
Copy link
Member

timriley commented Mar 9, 2024

If anyone here could upload a repo that reproduces the issue, I'd be happy to take a look.

@sunloverz
Copy link

sunloverz commented Oct 9, 2024

I'm getting this error with ruby 3.1, any solution?

@cllns
Copy link
Member

cllns commented Oct 9, 2024

@sunloverz Can you make a small example repo that reproduces the issue for us? That'd be extremely helpful and will help us fix this issue sooner. If that's not possible, can you share your Gemfile.lock?

@sunloverz
Copy link

@cllns I updated dry-configurable version to 0.14.0 version and it fixed that error. Thanks for your reply!

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

No branches or pull requests

7 participants