Open krlosgilson opened 8 months ago
Added gem 'apartment' to Gemfile [ok] Run: bundle install [ok] Run: bundle exec rails generate apartment:install [fail]
Generate apartment initializer file
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
Database: postgresql
Apartment version: 0.24.3
Rails (or ActiveRecord) version: 7.0.4.2
Ruby version: 3.2.1p31
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
gem 'ros-apartment', require: 'apartment'
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)
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