ruby – 显示宝石依赖的命令?

有没有一个命令告诉你宝石所依赖的其他宝石?

另外,有没有办法自动安装宝石的依赖?

解决方法

以下信息是从以下链接的rubygems命令引用的.

http://guides.rubygems.org/command-reference/#gem-dependency

你要求的第一个命令是“宝石依赖”.以下是命令描述.

gem dependency GEMNAME [options]

Options:
-v,--version VERSION            Specify version of gem to uninstall
-r,--[no-]reverse-dependencies  Include reverse dependencies in the output
-p,--pipe                       Pipe Format (name --version ver)

Common Options:
    --source URL                 Use URL as the remote source for gems
-h,--help                       Get help on this command
    --config-file FILE           Use this config file instead of default
    --backtrace                  Show stack backtrace on errors
    --debug                      Turn on Ruby debugging

Arguments:
GEMNAME   name of gems to show

Summary:
Show the dependencies of an installed gem

Defaults:
--version '> 0' --no-reverse

你需要的第二个命令是“gem install”.依赖关系自动安装.请参阅命令参考以获取更多详细信息.

“gem install” will install the named
gem. It will attempt a local
installation (i.e. a .gem file in the
current directory),and if that fails,
it will attempt to download and
install the most recent version of the
gem you want.

If a gem is being installed remotely,and it depends on other gems that are not installed,then gem will download and install those,after you have confirmed the operation.

相关文章

validates:conclusion,:presence=>true,:inclusion=>{...
一、redis集群搭建redis3.0以前,提供了Sentinel工具来监控各...
分享一下我老师大神的人工智能教程。零基础!通俗易懂!风趣...
上一篇博文 ruby传参之引用类型 里边定义了一个方法名 mo...
一编程与编程语言 什么是编程语言? 能够被计算机所识别的表...
Ruby类和对象Ruby是一种完美的面向对象编程语言。面向对象编...