Skip to content
This repository
Browse code

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
Michael Koziarski authored July 16, 2010

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  railties/lib/initializer.rb
2  railties/lib/initializer.rb
@@ -406,7 +406,7 @@ def load_view_paths
406 406
 
407 407
     # Eager load application classes
408 408
     def load_application_classes
409  
-      return if $rails_rake_task
  409
+      return if $rails_rake_task && configuration.dependency_loading
410 410
       if configuration.cache_classes
411 411
         configuration.eager_load_paths.each do |load_path|
412 412
           matcher = /\A#{Regexp.escape(load_path)}(.*)\.rb\Z/

0 notes on commit f57ca87

Please sign in to comment.
Something went wrong with that request. Please try again.