Get the gem load path from... Gem! I know, it is shocking.

This commit is contained in:
Adam Sanderson 2011-01-05 19:59:52 -08:00
parent 9a27899c92
commit 2c590a72a3
1 changed files with 3 additions and 4 deletions

View File

@ -10,11 +10,10 @@ end
# Register the default ruby gems configuration:
register_if_present :gem do
# Get the gem paths from the ruby load paths:
paths = ($:).grep(/gems/).map{|p| p[/.+\/gems\//]}.uniq
require 'rubygems' unless defined? Gem
# Add all the rubygems' paths:
add paths
# Add rubygems path:
add File.join(Gem.dir, 'gems')
end
# Register a perl configuration: