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 when trying to generate apartment initializer #682

Open
krlosgilson opened this issue Mar 20, 2024 · 1 comment
Open

Error when trying to generate apartment initializer #682

krlosgilson opened this issue Mar 20, 2024 · 1 comment

Comments

@krlosgilson
Copy link

krlosgilson commented Mar 20, 2024

Steps to reproduce

Added gem 'apartment' to Gemfile [ok]
Run: bundle install [ok]
Run: bundle exec rails generate apartment:install [fail]

Expected behavior

Generate apartment initializer file

Actual behavior

Error ocorred:
/home/carlos/.rvm/gems/ruby-3.2.1/gems/actionpack-7.0.4.2/lib/action_dispatch/middleware/stack.rb:37:in "build": undefined method "new" for "Apartment::Reloader":String (NoMethodError)

    klass.new(app, *args, &block)
         ^^^^

Did you mean? next

System configuration

  • Database: postgresql

  • Apartment version: 0.24.3

  • Rails (or ActiveRecord) version: 7.0.4.2

  • Ruby version: 3.2.1p31

@abhishek-fullstackror
Copy link

I encountered the same issue and resolved it by replacing the apartment gem with the ros-apartment gem. The updated Gemfile entry is as follows:
gem 'ros-apartment', require: 'apartment'
refences: link

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

2 participants