我正在使用 RubyGems 2.0.2。
当我安装一个似乎不依赖于 redis 或守护进程的 gem 时,它会安装它们。
% gem install my_gem
Successfully installed my_gem-0.1.2
Fetching: daemons-1.1.9.gem (100%)
Successfully installed daemons-1.1.9
Fetching: redis-3.0.4.gem (100%)
Successfully installed redis-3.0.4
Parsing documentation for my_gem-0.1.2
Installing ri documentation for my_gem-0.1.2
Parsing documentation for daemons-1.1.9
Installing ri documentation for daemons-1.1.9
Parsing documentation for redis-3.0.4
Installing ri documentation for redis-3.0.4
Done installing documentation for my_gem, daemons, redis after 3 seconds
3 gems installed
这是我检查 gem 依赖项所做的工作。
% foreach i ( `gem list | sed -e 's/\ .*//' ` )
foreach? echo $i
foreach? gem dependency $i | grep "redis\|daemons"
foreach? end
我安装的所有 gem 都不依赖于 redis 或守护进程。RubyGems 还能从哪里获取依赖信息?