From 57f0b9738e71016d8a9898d83fe39b2310bf6c91 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Wed, 3 Dec 2008 21:46:36 -0600 Subject: [PATCH] Remove config dir from the load path --- railties/lib/initializer.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index 4bb1e480b7..06a3332c42 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -569,7 +569,7 @@ Run `rake gems:install` to install the missing gems. def load_application_initializers if gems_dependencies_loaded Dir["#{configuration.root_path}/config/initializers/**/*.rb"].sort.each do |initializer| - load initializer.sub(/^#{Regexp.escape(configuration.root_path)}\//, '') + load(initializer) end end end @@ -927,7 +927,6 @@ Run `rake gems:install` to install the missing gems. app/controllers app/helpers app/services - config lib vendor ).map { |dir| "#{root_path}/#{dir}" }.select { |dir| File.directory?(dir) }