如何查找所有对某个gem具有运行时依赖性的gem

时间:2011-12-03 14:03:12

标签: ruby rubygems dependencies

如何找到对某个gem有运行依赖性的所有gem。

e.g. How do I find all gems which are dependent on mongoid gem version 2.3.4

2 个答案:

答案 0 :(得分:3)

您将-R(大写R)开关与gem dependency

一起使用
gem dependency mongoid -v '2.3.4' -R 

输出:

Gem mongoid-2.3.4
  activemodel (~> 3.1)
  bson_ext (~> 1.3, development)
  mocha (~> 0.9.12, development)
  mongo (~> 1.3)
  rdoc (~> 3.5.0, development)
  rspec (~> 2.6, development)
  tzinfo (~> 0.3.22)
  watchr (~> 0.6, development)

答案 1 :(得分:0)

gem dependency mongoid -v 2.3.4

此处的文档http://docs.rubygems.org/read/chapter/10#page78