Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed buggy gem activation. Don't pass a dependency to gem, pass the

name and requirement. Better, just activate the spec for the
dependency (1.8 only)
  • Loading branch information...
commit 4c3725723f15fab0a424cb1318b82b460714b72f 1 parent c20a4d1
@zenspider zenspider authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 railties/lib/rails/gem_dependency.rb
View
8 railties/lib/rails/gem_dependency.rb
@@ -72,7 +72,13 @@ def add_load_paths
@load_paths_added = @loaded = @frozen = true
return
end
- gem self
+
+ begin
+ self.to_spec.activate # >= 1.8 happy way
+ rescue
+ gem self.name, self.requirement # < 1.8 unhappy way
+ end
+
@spec = Gem.loaded_specs[name]
@frozen = @spec.loaded_from.include?(self.class.unpacked_path) if @spec
@load_paths_added = true
Please sign in to comment.
Something went wrong with that request. Please try again.