ActiveRecord cannot be eager loaded without ActionDispatch #7160

Closed
michaelfairley opened this Issue Jul 25, 2012 · 3 comments

2 participants

@michaelfairley

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.

@fxn
Ruby on Rails member

Could you please provide a minimal app to reproduce this?

@fxn
Ruby on Rails member

Awesome, thanks.

@fxn fxn was assigned Jul 28, 2012
@fxn fxn added a commit that referenced this issue Jul 28, 2012
@fxn 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
@fxn fxn added a commit that referenced this issue Jul 28, 2012
@fxn 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
@fxn fxn added a commit that closed this issue Jul 28, 2012
@fxn 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
@fxn fxn closed this in cc712f2 Jul 28, 2012
@fxn fxn added a commit that referenced this issue Jul 28, 2012
@fxn 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