有没有一个命令告诉你宝石所依赖的其他宝石?
另外,有没有办法自动安装宝石的依赖?
解决方法
以下信息是从以下链接的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.