Skip to content
This repository

ActiveRecord cannot be eager loaded without ActionDispatch #7160

Closed
michaelfairley opened this Issue · 3 comments

2 participants

Michael Fairley Xavier Noria
Michael Fairley

active_record/session_store.rb references ActionDispatch::Session::AbstractStore causing ActiveSupport::Autoload.eager_autoload! to error when it is called in a project with ActiveRecord but without ActionPack.

Xavier Noria
Owner
fxn commented

Could you please provide a minimal app to reproduce this?

Xavier Noria
Owner
fxn commented

Awesome, thanks.

Xavier Noria fxn referenced this issue from a commit
Xavier Noria fxn missing require: the AR session store depends on the AP abstract store
This require makes the dependency even more clear.
In particular we are eager loading the session
store but that does not work if AR is used
outside Rails, this patch is preliminary work
in fixing #7160.
bf16456
Xavier Noria fxn referenced this issue from a commit
Xavier Noria fxn missing require: the AR session store depends on the AP abstract store
This require makes the dependency even more clear.
In particular we are eager loading the session
store but that does not work if AR is used
outside Rails, this patch is preliminary work
in fixing #7160.
0cda0b3
Xavier Noria fxn closed this issue from a commit
Xavier Noria fxn removes the AR session store from eager loaded code [fixes #7160]
See the comment in the file activerecord/lib/active_record.rb
added by this patch for the rationale.
cc712f2
Xavier Noria fxn closed this in cc712f2
Xavier Noria fxn referenced this issue from a commit
Xavier Noria fxn removes the AR session store from eager loaded code [fixes #7160]
See the comment in the file activerecord/lib/active_record.rb
added by this patch for the rationale.
8bf1088
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.