diff options
Diffstat (limited to 'railties/lib/rails/gem_dependency.rb')
-rw-r--r-- | railties/lib/rails/gem_dependency.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/railties/lib/rails/gem_dependency.rb b/railties/lib/rails/gem_dependency.rb index 4cac7f725a..f8d97840c1 100644 --- a/railties/lib/rails/gem_dependency.rb +++ b/railties/lib/rails/gem_dependency.rb @@ -23,9 +23,13 @@ module Rails @unpack_directory = nil end + def unpacked_paths + Dir[File.join(self.class.unpacked_path, "#{@name}-#{@version || "*"}")] + end + def add_load_paths return if @loaded || @load_paths_added - unpacked_paths = Dir[File.join(self.class.unpacked_path, "#{@name}-#{@version || "*"}")] + unpacked_paths = self.unpacked_paths if unpacked_paths.empty? args = [@name] args << @requirement.to_s if @requirement |