加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

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

发布时间:2020-12-16 20:37:49 所属栏目:百科 来源:网络整理
导读:有没有一个命令告诉你宝石所依赖的其他宝石? 另外,有没有办法自动安装宝石的依赖? 解决方法 以下信息是从以下链接的rubygems命令引用的. http://guides.rubygems.org/command-reference/#gem-dependency 你要求的第一个命令是“宝石依赖”.以下是命令描述.
有没有一个命令告诉你宝石所依赖的其他宝石?

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

解决方法

以下信息是从以下链接的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.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读