Skip to content
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...
1 parent 7b6383f commit f57ca8772914810ae5049054b7a5b362cc1766d1 @NZKoz NZKoz committed Jul 16, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 railties/lib/initializer.rb
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/

0 comments on commit f57ca87

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