Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Check for uninstalled gem dependencies.
#!/usr/bin/ruby
require 'rubygems'
installed_gems = Gem::Dependency.new '', Gem::Requirement.default
missing = []
# mind the short-hand, looping over installed gem specs
specs = Gem.source_index.search installed_gems
specs.each do |spec|
gem = Gem::Dependency.new spec.name, spec.version
# looping over gem dependencies
specs = Gem.source_index.search gem
deps = specs.first.runtime_dependencies
deps.each do |dep|
# check if the dependency is missing
specs = Gem.source_index.search dep
if specs === [] then
missing.push dep
end
end
end
print missing.sort.uniq.collect{|spec| "#{spec}\n"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.