The 'preload_all_models' initializer is now run even when db:create is
called, so it avoids the database to be created on arvbox, for example,
because it attempts to access the database before being created.
This initializer was added 7 years ago and it now seems to not be needed
anymore, so I think it's the cleaner way to resolve this issue.
See: https://github.com/rails/rails/issues/32870
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas@di-pentima.com.ar>
+++ /dev/null
-# Copyright (C) The Arvados Authors. All rights reserved.
-#
-# SPDX-License-Identifier: AGPL-3.0
-
-# See http://aaronvb.com/articles/37-rails-caching-and-undefined-class-module
-
-# Config must be done before we load model class files; otherwise they
-# won't be able to use Rails.configuration.* to initialize their
-# classes.
-
-if Rails.env == 'development'
- Dir.foreach("#{Rails.root}/app/models") do |model_file|
- require_dependency model_file if model_file.match(/\.rb$/)
- end
-end