Skip to content

Instantly share code, notes, and snippets.

@NZKoz
Created July 15, 2010 05:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NZKoz/476526 to your computer and use it in GitHub Desktop.
Save NZKoz/476526 to your computer and use it in GitHub Desktop.
diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb
index 148ea53..fc68d00 100644
--- a/railties/lib/initializer.rb
+++ b/railties/lib/initializer.rb
@@ -406,7 +406,7 @@ Run `rake gems:install` to install the missing gems.
# 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/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment