Skip to content

Commit

Permalink
Fix Rails 7.0 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
byroot committed Aug 24, 2021
1 parent a8e9542 commit 7b43cd0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/spring/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ def preload
# override the effect of config.cache_classes = true. We can then actually
# set config.cache_classes = false after loading the environment.
Rails::Application.initializer :initialize_dependency_mechanism, group: :all do
ActiveSupport::Dependencies.mechanism = :load
if ActiveSupport::Dependencies.respond_to?(:mechanism=)
ActiveSupport::Dependencies.mechanism = :load
end
end

require Spring.application_root_path.join("config", "environment")
Expand Down

0 comments on commit 7b43cd0

Please sign in to comment.