显示宝石的依赖关系的命令? [英] Command for displaying a gem's dependencies?

查看:72
本文介绍了显示宝石的依赖关系的命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一个命令告诉你其他宝石是否依赖于宝石?



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

解决方案

以下信息是从以下链接的rubygems命令参考中提取的。



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



您要求的第一个命令是gem dependency。

  gem依赖项GEMNAME [选项] 

选项:
-v,--version VERSION指定要卸载的gem版本
-r, - [no-]反向依赖在输出中包含反向依赖关系
-p,--pipe管道格式(名称 - -version ver)

常用选项:
--source URL使用URL作为宝石的远程源
-h,--help获取有关此命令的帮助
--config-file FILE使用这个配置文件而不是默认值
--backtrace显示错误的堆栈回溯
--debug打开Ruby调试

参数:
GEMNAME宝石名称显示

总结:
显示已安装宝石的依赖关系

默认值:
--version'> 0'--no-reverse

您需要的第二个命令是gem install。依赖项会自动安装。阅读下面的引用以获取更多详细信息。


gem install将安装名为
的宝石。它会尝试进行本地
安装(即
当前目录中的.gem文件),如果失败,
将尝试下载,
安装最新版本

如果远程安装一个gem,
并且它取决于其他geb是
而不是安装完毕后,gem将下载
并安装这些,之后您有
确认操作。



Is there a command that tells you the other gems that a gem depends on?

Also, is there a way to auto install the gem's dependencies?

解决方案

The following information was pulled from the rubygems command reference linked below.

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

The first command you're asking for is "gem dependency". Below is the command description.

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

The second command you'll need is "gem install". Dependencies get installed automatically. Read the quote below from the command reference for more detail.

"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.

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

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