aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrick <technoweenie@gmail.com>2008-06-08 14:30:14 -0400
committerrick <technoweenie@gmail.com>2008-06-08 14:30:14 -0400
commit51e4106dcc58e5218e8b297ad870a063b7bb1ab8 (patch)
tree92ffcf80d784487ce1443ab97ff43db48fb3fc40
parentfaad1e32a8ab81890018ba89d191607778830cf0 (diff)
downloadrails-51e4106dcc58e5218e8b297ad870a063b7bb1ab8.tar.gz
rails-51e4106dcc58e5218e8b297ad870a063b7bb1ab8.tar.bz2
rails-51e4106dcc58e5218e8b297ad870a063b7bb1ab8.zip
Add the gem load paths before the framework is loaded, so certain gems like RedCloth and BlueCloth can be frozen. [#320 state:resolved]
-rw-r--r--railties/CHANGELOG2
-rw-r--r--railties/lib/initializer.rb8
2 files changed, 6 insertions, 4 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG
index a43455ae2c..93f4f8fa28 100644
--- a/railties/CHANGELOG
+++ b/railties/CHANGELOG
@@ -1,5 +1,7 @@
*Edge*
+* Add the gem load paths before the framework is loaded, so certain gems like RedCloth and BlueCloth can be frozen.
+
* Fix discrepancies with loading rails/init.rb from gems.
* Plugins check for the gem init path (rails/init.rb) before the standard plugin init path (init.rb) [Jacek Becela]
diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb
index f0b5e3f257..3d94cedb47 100644
--- a/railties/lib/initializer.rb
+++ b/railties/lib/initializer.rb
@@ -113,10 +113,10 @@ module Rails
check_ruby_version
install_gem_spec_stubs
set_load_path
-
+ add_gem_load_paths
+
require_frameworks
set_autoload_paths
- add_gem_load_paths
add_plugin_load_paths
load_environment
@@ -242,12 +242,12 @@ module Rails
def add_gem_load_paths
unless @configuration.gems.empty?
require "rubygems"
- @configuration.gems.each &:add_load_paths
+ @configuration.gems.each { |gem| gem.add_load_paths }
end
end
def load_gems
- @configuration.gems.each(&:load)
+ @configuration.gems.each { |gem| gem.load }
end
def check_gem_dependencies