gemloader.rb 298 B

12345678910
  1. require 'rubygems'
  2. project = 'rack'
  3. gemspec = File.expand_path("#{project}.gemspec", Dir.pwd)
  4. Gem::Specification.load(gemspec).dependencies.each do |dep|
  5. begin
  6. gem dep.name, *dep.requirement.as_list
  7. rescue Gem::LoadError
  8. warn "Cannot load #{dep.name} #{dep.requirement.to_s}"
  9. end
  10. end