diff options
author | rick <technoweenie@gmail.com> | 2008-05-31 17:22:16 -0700 |
---|---|---|
committer | rick <technoweenie@gmail.com> | 2008-05-31 17:22:16 -0700 |
commit | 71528b1825ce5184b23d09f923cb72f4073ce8ed (patch) | |
tree | 798ac7cc8ede435aaa35fa04afeaaeba3c45d7f7 /railties | |
parent | 6a975d6ca28216cfa015374c802279349e9253ca (diff) | |
download | rails-71528b1825ce5184b23d09f923cb72f4073ce8ed.tar.gz rails-71528b1825ce5184b23d09f923cb72f4073ce8ed.tar.bz2 rails-71528b1825ce5184b23d09f923cb72f4073ce8ed.zip |
Previously we only added the "lib" subdirectory to the load path when
setting up gem dependencies for frozen gems. Now we add the "ext"
subdirectory as well for those gems which have compiled C extensions
as well. [Wincent Colaiuta]
[#268 state:resolved]
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/gem_dependency.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/railties/lib/rails/gem_dependency.rb b/railties/lib/rails/gem_dependency.rb index 0e39f6fd0a..9f088a18dd 100644 --- a/railties/lib/rails/gem_dependency.rb +++ b/railties/lib/rails/gem_dependency.rb @@ -31,7 +31,9 @@ module Rails args << @requirement.to_s if @requirement gem *args else - $LOAD_PATH << File.join(unpacked_paths.first, 'lib') + $LOAD_PATH.unshift File.join(unpacked_paths.first, 'lib') + ext = File.join(unpacked_paths.first, 'ext') + $LOAD_PATH.unshift(ext) if File.exist?(ext) @frozen = true end @load_paths_added = true |