2 # there can be more than one path
3 PATHS = `ruby -rubygems -e "puts Gem.path"`.split
9 path = path.strip + "/gems"
10 Dir.foreach(path) do |name|
11 @gems << "#{path}/#{name}"
18 @gems ? @gems : find_gems
21 def self.load_gem(name)
22 possible = gems.find_all { |g| /#{name}-.*/.match(g) }.sort
24 raise LoadError, "unknown gem '#{name}'"
27 $:.unshift "#{possible}/lib"
29 STDERR.puts "[Loaded gem #{name} with quickgem]"
36 QuickGem.load_gem(name)