rails-observers
rails-observers copied to clipboard
Realease for 5.2.3
Any plans on releasing the gem with Rails 5.2.3 compatibility?
What do you mean by that? All versions released of this gem should support 5.2.3.
I'm sorry I didn't explain it well. When trying to use rails-observers on version 0.1.5 with rails 5.2.3 I'm getting this error:
uninitialized constant ActiveRecord::Base::ConnectionHandling (NameError)
. Using the master solves it. I guess this commit https://github.com/rails/rails-observers/commit/389b577322d8b17336730b2dc4e179060a23c8e7
is fixing the problem.
We are not able to use the master when installing the gem because we use an internal artifactory that only enable us to install gems that are published.
I guess this commit https://github.com/rails/rails-observers/commit/389b577322d8b17336730b2dc4e179060a23c8e7 is fixing the problem.
I suppose you meant this commit: 2befc21e7ed991a242094a88afaa8bce4ea16f67
Thanks for the answer @amatsuda. When bundling the app pointing to this commit I'm getting the error bellow:
/usr/local/bundle/gems/railties-5.2.3/lib/rails/railtie/configuration.rb:97:in
method_missing': undefined method active_record' for #<Rails::Application::Configuration:0x000055ac33bde400> (NoMethodError)
When bundling the app pointing to rails-observers
master, it will bundle just fine. Since the changes made on the commit you pointed out are no longer on the master (045d5cf02d7166aa379a1d913b5b8ea068695da6), I guess the commit that are fixing the issue is the 389b577322d8b17336730b2dc4e179060a23c8e7.
Running bin/rails db:migrate
with Rails 5.2.8.1,
I get:
rails aborted!
uninitialized constant ActionController::Caching::Sweeper
/my_app/app/sweepers/source_sweeper.rb:1:in `<main>'
/my_app/config/environment.rb:7:in `<main>'
bin/rails:4:in `<main>'
Switching to latest master did not fix the issue.
The solution was to add to the top of each sweeper:
require "rails/observers/action_controller/caching"
I found the solution in the still-open #4 from 2013. It seems that this gem does not get loaded properly by bundler.
Please release a fixed version of the gem!