Skip to content

Commit 6cdfaf5

Browse files
authored
Merge pull request #651 from casperisfine/rails-7-support
Fix Rails 7.0 compatibility
2 parents a8e9542 + 7b43cd0 commit 6cdfaf5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/spring/application.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ def preload
100100
# override the effect of config.cache_classes = true. We can then actually
101101
# set config.cache_classes = false after loading the environment.
102102
Rails::Application.initializer :initialize_dependency_mechanism, group: :all do
103-
ActiveSupport::Dependencies.mechanism = :load
103+
if ActiveSupport::Dependencies.respond_to?(:mechanism=)
104+
ActiveSupport::Dependencies.mechanism = :load
105+
end
104106
end
105107

106108
require Spring.application_root_path.join("config", "environment")

0 commit comments

Comments
 (0)