We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Install any gem use ActiveRecord will cause this problem. ex. Rails Admin
The ActiveSupport.run_load_hooks(:active_record, Base) should run after application's initialize loaded.
ActiveSupport.run_load_hooks(:active_record, Base)
I found this problem because the default belongs_to_required_by_default becomes nil
belongs_to_required_by_default
nil
If any gem use ActiveRecord, the Rails will loaded like below:
config/application.rb
config/environments/*.rb
config/initializers/**/*.rb
So, the actual on_load(:active_record) will happens when gem loaded and try to autoload ActiveRecord and not the application initialize.
on_load(:active_record)
ActiveRecord
Every things happen before we configured it.
Rails version: 5.0.1
Ruby version: 2.3.1
The text was updated successfully, but these errors were encountered:
If my understanding is right, that is a matter of gem. I guess that ActiveRecord::Base has not re-opening in right way. Ref: #23589 (comment)
ActiveRecord::Base
Sorry, something went wrong.
Yeah, I think this is same problem.
Agree with @y-yagi, this seems like an issue with the gems.
No branches or pull requests
Steps to reproduce
Install any gem use ActiveRecord will cause this problem. ex. Rails Admin
Expected behavior
The
ActiveSupport.run_load_hooks(:active_record, Base)
should run after application's initialize loaded.Actual behavior
If any gem use ActiveRecord, the Rails will loaded like below:
config/application.rb
config/environments/*.rb
config/initializers/**/*.rb
So, the actual
on_load(:active_record)
will happens when gem loaded and try to autoloadActiveRecord
and not the application initialize.Every things happen before we configured it.
System configuration
Rails version: 5.0.1
Ruby version: 2.3.1
The text was updated successfully, but these errors were encountered: