diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-09-11 10:31:31 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-09-11 10:31:31 -0500 |
commit | 72721c67254ae5b9596fb386d18a1d54745ee14b (patch) | |
tree | 31d33dd12bfaddae682cccff50dcaba3f1293ab8 /railties | |
parent | f024aabee37520e8c894a83710fc121c0056dd2b (diff) | |
download | rails-72721c67254ae5b9596fb386d18a1d54745ee14b.tar.gz rails-72721c67254ae5b9596fb386d18a1d54745ee14b.tar.bz2 rails-72721c67254ae5b9596fb386d18a1d54745ee14b.zip |
Add gem load paths after loading environment
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/initializer.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index 336bff9534..d882a6714a 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -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. |