如何找到依赖于给定宝石的宝石? [英] How do I find gems that depend on a given gem?

查看:14
本文介绍了如何找到依赖于给定宝石的宝石?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以搜索所有依赖于某个 ruby​​gem 的 gem?

Is it possible to search for all gems that rely on a certain rubygem?

例如,我想查询 gemcutter 中依赖于测试单元 gem 的所有 gem.

For example, I'd like to ask for all gems in gemcutter that rely on the test-unit gem.

背景:我正在寻找其他 gem 如何处理提到的问题 这里.

Background: I'm looking to see how other gems handle the issue mentioned here.

推荐答案

我遇到了同样的问题,发现这个问题的其他一些建议现在已经失效了.我想出了一个适合我的两步解决方案.

I had the same problem, and found that some of the other suggestions for this question are now defunct. I came up with a 2-step solution that worked for me.

以下 unix-y 脚本将告诉您所有 gem 依赖的 gem:

The following unix-y script will tell you all the gems your gems depend on:

gem list | egrep '^.*[ ]' -o | gem dependency

然后我只是在输出中搜索了罪魁祸首.

Then I just searched for the culprit in the output.

这篇关于如何找到依赖于给定宝石的宝石?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆