Get the gem load path from... Gem! I know, it is shocking.
This commit is contained in:
parent
9a27899c92
commit
2c590a72a3
|
@ -10,11 +10,10 @@ end
|
||||||
|
|
||||||
# Register the default ruby gems configuration:
|
# Register the default ruby gems configuration:
|
||||||
register_if_present :gem do
|
register_if_present :gem do
|
||||||
# Get the gem paths from the ruby load paths:
|
require 'rubygems' unless defined? Gem
|
||||||
paths = ($:).grep(/gems/).map{|p| p[/.+\/gems\//]}.uniq
|
|
||||||
|
|
||||||
# Add all the rubygems' paths:
|
# Add rubygems path:
|
||||||
add paths
|
add File.join(Gem.dir, 'gems')
|
||||||
end
|
end
|
||||||
|
|
||||||
# Register a perl configuration:
|
# Register a perl configuration:
|
||||||
|
|
Loading…
Reference in New Issue