Need help with error "NameError: method `logger' not defined in Concurrent::MutableStruct::ThreadSafeConfig" #858
-
Firstly, need to say that I've only been working with Ruby etc for a couple years, so excuse me 🙏 We have a Padrino app that's undergoing some well needed maintenance to bring it up to a modern Ruby version. Part of that requires moving to a newer padrino version that supports Ruby 3 ( Since making those changes, the app does not boot and we see the following error. I've reached the extent of my debugging power and need some help from someone who has a deeper understanding of these libraries, please. Any help or advice or guidance is really appreciated as I'm stuck. Stack trace
NameError: method `logger' not defined in Concurrent::MutableStruct::ThreadSafeConfig
/home/circleci/project/vendor/bundle/ruby/3.3.0/gems/concurrent-ruby-1.3.4/lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:160:in `remove_method'
/home/circleci/project/vendor/bundle/ruby/3.3.0/gems/concurrent-ruby-1.3.4/lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:160:in `block in define_struct_class'
/home/circleci/project/vendor/bundle/ruby/3.3.0/gems/concurrent-ruby-1.3.4/lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:159:in `each'
/home/circleci/project/vendor/bundle/ruby/3.3.0/gems/concurrent-ruby-1.3.4/lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:159:in `each_with_index'
/home/circleci/project/vendor/bundle/ruby/3.3.0/gems/concurrent-ruby-1.3.4/lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb:159:in `define_struct_class'
/home/circleci/project/vendor/bundle/ruby/3.3.0/gems/concurrent-ruby-1.3.4/lib/concurrent-ruby/concurrent/mutable_struct.rb:223:in `block in define_struct'
/home/circleci/project/vendor/bundle/ruby/3.3.0/gems/concurrent-ruby-1.3.4/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:48:in `block in synchronize'
/home/circleci/project/vendor/bundle/ruby/3.3.0/gems/concurrent-ruby-1.3.4/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:48:in `synchronize'
/home/circleci/project/vendor/bundle/ruby/3.3.0/gems/concurrent-ruby-1.3.4/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb:48:in `synchronize'
/home/circleci/project/vendor/bundle/ruby/3.3.0/gems/concurrent-ruby-1.3.4/lib/concurrent-ruby/concurrent/mutable_struct.rb:222:in `define_struct'
/home/circleci/project/vendor/bundle/ruby/3.3.0/gems/concurrent-ruby-1.3.4/lib/concurrent-ruby/concurrent/mutable_struct.rb:217:in `new'
/home/circleci/project/vendor/bundle/ruby/3.3.0/gems/sidekiq-unique-jobs-8.0.10/lib/sidekiq_unique_jobs/config.rb:5:in `<module:SidekiqUniqueJobs>'
/home/circleci/project/vendor/bundle/ruby/3.3.0/gems/sidekiq-unique-jobs-8.0.10/lib/sidekiq_unique_jobs/config.rb:3:in `<top (required)>'
/home/circleci/project/vendor/bundle/ruby/3.3.0/gems/sidekiq-unique-jobs-8.0.10/lib/sidekiq_unique_jobs.rb:79:in `<top (required)>'
/home/circleci/project/vendor/bundle/ruby/3.3.0/gems/sidekiq-unique-jobs-8.0.10/lib/sidekiq-unique-jobs.rb:3:in `<top (required)>'
<internal:/usr/local/lib/ruby/site_ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
<internal:/usr/local/lib/ruby/site_ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
/home/circleci/.rubygems/gems/bundler-2.5.21/lib/bundler/runtime.rb:60:in `block (2 levels) in require'
/home/circleci/.rubygems/gems/bundler-2.5.21/lib/bundler/runtime.rb:55:in `each'
/home/circleci/.rubygems/gems/bundler-2.5.21/lib/bundler/runtime.rb:55:in `block in require'
/home/circleci/.rubygems/gems/bundler-2.5.21/lib/bundler/runtime.rb:44:in `each'
/home/circleci/.rubygems/gems/bundler-2.5.21/lib/bundler/runtime.rb:44:in `require'
/home/circleci/.rubygems/gems/bundler-2.5.21/lib/bundler.rb:212:in `require'
/home/circleci/project/config/boot.rb:12:in `<top (required)>'
/home/circleci/project/vendor/bundle/ruby/3.3.0/gems/padrino-core-0.16.0.pre3/lib/padrino-core/cli/rake_tasks.rb:15:in `block in <top (required)>'
/home/circleci/project/vendor/bundle/ruby/3.3.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/home/circleci/.rubygems/gems/bundler-2.5.21/lib/bundler/cli/exec.rb:58:in `load'
/home/circleci/.rubygems/gems/bundler-2.5.21/lib/bundler/cli/exec.rb:58:in `kernel_load'
/home/circleci/.rubygems/gems/bundler-2.5.21/lib/bundler/cli/exec.rb:23:in `run'
/home/circleci/.rubygems/gems/bundler-2.5.21/lib/bundler/cli.rb:455:in `exec'
/home/circleci/.rubygems/gems/bundler-2.5.21/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
/home/circleci/.rubygems/gems/bundler-2.5.21/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/home/circleci/.rubygems/gems/bundler-2.5.21/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'
/home/circleci/.rubygems/gems/bundler-2.5.21/lib/bundler/cli.rb:35:in `dispatch'
/home/circleci/.rubygems/gems/bundler-2.5.21/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
/home/circleci/.rubygems/gems/bundler-2.5.21/lib/bundler/cli.rb:29:in `start'
/home/circleci/.rubygems/gems/bundler-2.5.21/exe/bundle:28:in `block in <top (required)>'
/home/circleci/.rubygems/gems/bundler-2.5.21/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
/home/circleci/.rubygems/gems/bundler-2.5.21/exe/bundle:20:in `<top (required)>'
/home/circleci/.rubygems/bin/bundle:25:in `load'
/home/circleci/.rubygems/bin/bundle:25:in `<main>' Gemfile.lock
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @duknic 👋🏻 We both work on a project affected by this issue, for detailed discussion of the error I'd recommend this comment on that private repo. In summary - Padrino monkey patches In terms of a fix, I believe the logical candidates are either concurrent ruby (use [Sidenote - while it's definitely preferrable to upgrade Padrino, Sidekiq and Sidekiq Unique Jobs, we can still get at least as far as Ruby 3.1.4 without those upgrades] |
Beta Was this translation helpful? Give feedback.
Ah, sorry for assuming! I know the last time I looked at this I wasn't very optimistic about merging a fix (certainly, Padrino is not that active any more), the other option is to fork either project.
For Speakout (the private repo linked above), we've basically accepted the older versions of Sidekiq and Sidekiq Unique Jobs (while we miss out on a lot of the newer web UI features, we also avoid the related security issues).
I've opened an issue in concurrent ruby here, I'm more optimistic that they might make the fix and publish a new release, I'll leave it to you to see if you can speed that up.