Closed langalex closed 1 year ago
When adding this to a Rails app that does not require ActiveRecord, I get this error:
13:53:33 web.1 | .../ruby/3.2.0/lib/ruby/gems/3.2.0/gems/rails_performance-1.1.0/lib/rails_performance/engine.rb:58:in `block in <class:Engine>': uninitialized constant RailsPerformance::Engine::ActiveRecord (NameError) 13:53:33 web.1 | 13:53:33 web.1 | ActiveRecord::LogSubscriber.send :prepend, RailsPerformance::Extensions::Db 13:53:33 web.1 | ^^^^^^^^^^^^^^^ 13:53:33 web.1 | Did you mean? ActiveModel
@langalex can you try to contribute? I think you can just fork gem, connect it to your app and improve code.
I hope that something like
if defined?(ActiveRecord) .... end
will work
fixed
When adding this to a Rails app that does not require ActiveRecord, I get this error: