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

NoMethodError: undefined method `configure' for Apartment:Module in initializer #231

Open
tomasperone opened this issue Sep 5, 2023 · 0 comments

Comments

@tomasperone
Copy link

Expected behavior

The application should start up without issues being thrown on the initializer.

Actual behavior

The following error is being thrown:

NoMethodError: undefined method `configure' for Apartment:Module
remote:        /tmp/build_2ef77eb9/config/initializers/apartment.rb:16:in `<top (required)>'
remote:        /tmp/build_2ef77eb9/vendor/bundle/ruby/3.0.0/gems/railties-7.0.0/lib/rails/engine.rb:667:in `load'
remote:        /tmp/build_2ef77eb9/vendor/bundle/ruby/3.0.0/gems/railties-7.0.0/lib/rails/engine.rb:667:in `block in load_config_initializer'
remote:        /tmp/build_2ef77eb9/vendor/bundle/ruby/3.0.0/gems/activesupport-7.0.0/lib/active_support/notifications.rb:208:in `instrument'
remote:        /tmp/build_2ef77eb9/vendor/bundle/ruby/3.0.0/gems/railties-7.0.0/lib/rails/engine.rb:666:in `load_config_initializer'
remote:        /tmp/build_2ef77eb9/vendor/bundle/ruby/3.0.0/gems/railties-7.0.0/lib/rails/engine.rb:620:in `block (2 levels) in <class:Engine>'
remote:        /tmp/build_2ef77eb9/vendor/bundle/ruby/3.0.0/gems/railties-7.0.0/lib/rails/engine.rb:619:in `each'
remote:        /tmp/build_2ef77eb9/vendor/bundle/ruby/3.0.0/gems/railties-7.0.0/lib/rails/engine.rb:619:in `block in <class:Engine>'
remote:        /tmp/build_2ef77eb9/vendor/bundle/ruby/3.0.0/gems/railties-7.0.0/lib/rails/initializable.rb:32:in `instance_exec'
remote:        /tmp/build_2ef77eb9/vendor/bundle/ruby/3.0.0/gems/railties-7.0.0/lib/rails/initializable.rb:32:in `run'
remote:        /tmp/build_2ef77eb9/vendor/bundle/ruby/3.0.0/gems/railties-7.0.0/lib/rails/initializable.rb:61:in `block in run_initializers'
remote:        /tmp/build_2ef77eb9/vendor/bundle/ruby/3.0.0/gems/railties-7.0.0/lib/rails/initializable.rb:50:in `each'
remote:        /tmp/build_2ef77eb9/vendor/bundle/ruby/3.0.0/gems/railties-7.0.0/lib/rails/initializable.rb:50:in `tsort_each_child'
remote:        /tmp/build_2ef77eb9/vendor/bundle/ruby/3.0.0/gems/railties-7.0.0/lib/rails/initializable.rb:60:in `run_initializers'
remote:        /tmp/build_2ef77eb9/vendor/bundle/ruby/3.0.0/gems/railties-7.0.0/lib/rails/application.rb:369:in `initialize!'
remote:        /tmp/build_2ef77eb9/config/environment.rb:5:in `<top (required)>'
remote:        /tmp/build_2ef77eb9/vendor/bundle/ruby/3.0.0/gems/zeitwerk-2.6.11/lib/zeitwerk/kernel.rb:38:in `require'
remote:        /tmp/build_2ef77eb9/vendor/bundle/ruby/3.0.0/gems/zeitwerk-2.6.11/lib/zeitwerk/kernel.rb:38:in `require'
remote:        /tmp/build_2ef77eb9/vendor/bundle/ruby/3.0.0/gems/railties-7.0.0/lib/rails/application.rb:345:in `require_environment!'
remote:        /tmp/build_2ef77eb9/vendor/bundle/ruby/3.0.0/gems/railties-7.0.0/lib/rails/application.rb:507:in `block in run_tasks_blocks'
remote:        /tmp/build_2ef77eb9/vendor/bundle/ruby/3.0.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/task.rb:61:in `block (2 levels) in define'
remote:        Tasks: TOP => environment
remote:        (See full trace by running task with --trace)

System configuration

  • MacOS 13.4 (Intel chip)
  • Bundler version 2.3.25
  • Ruby version 3.0.2p107
  • Rails version 7.0
  • Gemfile has:
gem 'apartment-sidekiq'
gem 'ros-apartment-sidekiq'
...
gem 'apartment'
gem 'ros-apartment'

I also tried requiring apartment such as:
gem 'ros-apartment', require: 'apartment'

  • Database: (Tell us what database and its version you use.)
    PostgreSQL 15

  • Apartment version:

  * apartment (0.24.3)
  * apartment-sidekiq (0.0.5)
  * ros-apartment (2.11.0)
  * ros-apartment-sidekiq (1.2.0)
  • Apartment config (in config/initializers/apartment.rb or so):

    • use_schemas: (true or false)
  • Rails (or ActiveRecord) version:
    Rails 7.0

  • Ruby version:
    3.0.2p107

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