1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Add gem load paths after loading environment

This commit is contained in:
Joshua Peek 2009-09-11 10:31:31 -05:00
parent f024aabee3
commit 72721c6725

View file

@ -148,15 +148,6 @@ module Rails
$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 @@ module Rails
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.