如何从Gemfile中查看依赖关系树? [英] How to see the dependency tree just from Gemfile?
问题描述
执行 bundle install时出现以下错误
确保在捆绑之前`gem install couchbase -v'1.3.3'`成功。
现在,我没有在 Gemfile $ c中包含这个gem $ c>,所以它来自一些依赖。
由于 bundle install
失败,我不知道该如何确定哪个gem依赖于此couchbase gem?没有 Gemfile.lock
来找出这个依赖关系。
gem dependency
(不带任何参数)应该显示当前Gemfile及其依赖关系中的所有宝石。
编辑:
您也可以执行 gem dependency -R
(或者只是 dep
insted of dependency
),如果你想找出哪些宝石使用特定(或全部)宝石。
对于更深的依赖关系,我会解析第一个gem依赖关系的输出(regex也许?),选择gem的名字并调用 gem dep
,但这只是一个松散的想法。
I am getting the following error when doing bundle install
Make sure that `gem install couchbase -v '1.3.3'` succeeds before bundling.
Now, i have not included this gem in the Gemfile
, so it's coming from some dependency. How can i figure out which gem is dependent on this couchbase gem?
Since bundle install
is failing and I don't have Gemfile.lock
to figure out this dependency.
gem dependency
(with no args) should show you all gems from current Gemfile with their dependencies.
Edit:
You can also do gem dependency -R
(or just dep
insted of dependency
) if you want to find out which gems use specific (or all) gems.
For deeper dependencies I'd parse output (regex maybe?) of first gem dependencies, pick gem's names and call gem dep
on each of them, but that's just a loose idea.
这篇关于如何从Gemfile中查看依赖关系树?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!