Permalink
Browse files

Add gem load paths after loading environment

  • Loading branch information...
1 parent f024aab commit 72721c67254ae5b9596fb386d18a1d54745ee14b @josh josh committed Sep 11, 2009
Showing with 9 additions and 9 deletions.
  1. +9 −9 railties/lib/initializer.rb
@@ -148,15 +148,6 @@ def self.run(initializer = nil, config = nil)
$LOAD_PATH.uniq!
end
- Initializer.default.add :add_gem_load_paths do
- require 'rails/gem_dependency'
- Rails::GemDependency.add_frozen_gem_path
- unless config.gems.empty?
- require "rubygems"
- config.gems.each { |gem| gem.add_load_paths }
- end
- end
-
# Requires all frameworks specified by the Configuration#frameworks
# list. By default, all frameworks (Active Record, Active Support,
# Action Pack, Action Mailer, and Active Resource) are loaded.
@@ -221,6 +212,15 @@ def self.run(initializer = nil, config = nil)
end
end
+ Initializer.default.add :add_gem_load_paths do
+ require 'rails/gem_dependency'
+ Rails::GemDependency.add_frozen_gem_path
+ unless config.gems.empty?
+ require "rubygems"
+ config.gems.each { |gem| gem.add_load_paths }
+ end
+ end
+
# Preload all frameworks specified by the Configuration#frameworks.
# Used by Passenger to ensure everything's loaded before forking and
# to avoid autoload race conditions in JRuby.

0 comments on commit 72721c6

Please sign in to comment.