Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Only skip eager loading the code if dependency_loading is still enabled.

Otherwise rake tasks which depend on environment will get errors about missing constants.
  • Loading branch information...
commit f57ca8772914810ae5049054b7a5b362cc1766d1 1 parent 7b6383f
@NZKoz NZKoz authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  railties/lib/initializer.rb
View
2  railties/lib/initializer.rb
@@ -406,7 +406,7 @@ def load_view_paths
# Eager load application classes
def load_application_classes
- return if $rails_rake_task
+ return if $rails_rake_task && configuration.dependency_loading
if configuration.cache_classes
configuration.eager_load_paths.each do |load_path|
matcher = /\A#{Regexp.escape(load_path)}(.*)\.rb\Z/
Please sign in to comment.
Something went wrong with that request. Please try again.