You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Essentially when you require delayed_job_active_record, since it has a class that inherits from ActiveRecord::Base, it causes the Rails class loader to initialize ActiveRecord which causes some parts of Rails to then not be configurable.
I was pointed to this guide which recommends using the on_load hooks of ActiveSupport:
ActiveSupport.on_load(:active_record) do
DEFINE Delayed::Backend::ActiveRecord::Job < ::ActiveRecord::Base here
end
This will cause the block to get loaded after Rails initializes ActiveRecord
The text was updated successfully, but these errors were encountered:
Some additional context in this Rails issue.
Essentially when you require
delayed_job_active_record
, since it has a class that inherits fromActiveRecord::Base
, it causes the Rails class loader to initializeActiveRecord
which causes some parts of Rails to then not be configurable.I was pointed to this guide which recommends using the
on_load
hooks ofActiveSupport
:This will cause the block to get loaded after Rails initializes
ActiveRecord
The text was updated successfully, but these errors were encountered: