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

Realease for 5.2.3 #80

Open
vitorsgomes opened this issue Jul 15, 2019 · 5 comments
Open

Realease for 5.2.3 #80

vitorsgomes opened this issue Jul 15, 2019 · 5 comments

Comments

@vitorsgomes
Copy link

Any plans on releasing the gem with Rails 5.2.3 compatibility?

@rafaelfranca
Copy link
Member

What do you mean by that? All versions released of this gem should support 5.2.3.

@vitorsgomes
Copy link
Author

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.

@amatsuda
Copy link
Member

I guess this commit 389b577 is fixing the problem.

I suppose you meant this commit: 2befc21

@vitorsgomes
Copy link
Author

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 (045d5cf), I guess the commit that are fixing the issue is the 389b577.

@pboling
Copy link

pboling commented Apr 11, 2023

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!

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

4 participants