Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'rubygems'
- gem = Gem::Dependency.new('rails', '=2.1.2')
- matches = Gem.source_index.find_name(gem.name, gem.version_requirements)
- matches.last.runtime_dependencies.each do |dep_gem|
- puts "#{dep_gem.name}, #{dep_gem.version_requirements}" # => nil, nil, nil, nil, nil, nil
- end
- # >> rake, >= 0.8.1
- # >> activesupport, = 2.1.2
- # >> activerecord, = 2.1.2
- # >> actionpack, = 2.1.2
- # >> actionmailer, = 2.1.2
- # >> activeresource, = 2.1.2
Add Comment
Please, Sign In to add comment