如何找出哪个 gem 具有特定的依赖关系? [英] How do I find out which gem has a specific dependency?
本文介绍了如何找出哪个 gem 具有特定的依赖关系?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我注释掉了一个 gem,但捆绑安装"仍然无法运行.如何找出哪个 gem 依赖于 sys-proctable?
I commented out a gem, but 'bundle install' still won't run. How do I find out which gem has a dependency on sys-proctable?
$ bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Could not find sys-proctable-0.9.2 in any of the sources
$ grep proctable Gemfile
#gem 'sys-proctable', '0.9.2', :path => "vendor/gems"
$ bundle list
Resolving dependencies...
Could not find gem 'rspec-rails (= 2.11.0) ruby' in the gems available on this machine.
$ bundle viz
Resolving dependencies...
Could not find gem 'rspec-rails (= 2.11.0) ruby' in the gems available on this machine.
$ bundle -v
Bundler version 1.3.0
$ ruby -v
ruby 1.9.3p385 (2013-02-06 revision 39114) [i386-cygwin]
Gemfile:http://pastebin.com/9WWMfKtv
我已经尝试过这些故障排除步骤:https://github.com/carlhuda/bundler/blob/1-2-stable/ISSUES.md
I've already tried these troubleshooting steps: https://github.com/carlhuda/bundler/blob/1-2-stable/ISSUES.md
推荐答案
在 bash shell 中你可以这样做:
In the bash shell you can do:
gem 依赖名_of_the_gem --reverse-dependencies
例如:
$ gem dependency activesupport --reverse-dependencies
Gem activesupport-2.3.14
Used by
actionpack-2.3.14 (activesupport (= 2.3.14))
activerecord-2.3.14 (activesupport (= 2.3.14))
activeresource-2.3.14 (activesupport (= 2.3.14))
这篇关于如何找出哪个 gem 具有特定的依赖关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文