Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用vagrant时出现Ruby gem依赖项错误_Ruby_Dependencies_Vagrant_Chef Infra - Fatal编程技术网

使用vagrant时出现Ruby gem依赖项错误

使用vagrant时出现Ruby gem依赖项错误,ruby,dependencies,vagrant,chef-infra,Ruby,Dependencies,Vagrant,Chef Infra,今天我想用vagrant和chef启动我的虚拟Ubuntu 14.04服务器。就像在每一个优秀的开发者故事中一样,它在前一天工作得非常完美,所以我的假设是它会再次工作。然而,这并不是现实给我的 ==> default: stdin: is not a tty ==> default: ERROR: While executing gem ... (Gem::DependencyError) ==> default: Unable to resolve dependen

今天我想用vagrant和chef启动我的虚拟Ubuntu 14.04服务器。就像在每一个优秀的开发者故事中一样,它在前一天工作得非常完美,所以我的假设是它会再次工作。然而,这并不是现实给我的

==> default: stdin: is not a tty
==> default: ERROR:  While executing gem ... (Gem::DependencyError)
==> default:     Unable to resolve dependencies: ohai requires mime-types (~> 2.0); rest-client requires mime-types (~> 1.16)
它以前从未这样做过,我对它可能是什么感到困惑。我已经检查了虚拟机的互联网连接,它是健全的


99.999%的流浪汉和厨师脚本是由其他人制作的,我必须承认我对厨师的知识,尤其是Ruby的知识有点有限。我没有改变脚本中的任何内容。唯一发生的事情是,我的机器一夜之间消耗了太多内存,以至于无法工作。所以我不得不重新设置机器。

我用chef 10.28.0解决了这个问题。问题在于,chef要求提供以下依赖项:

ohai >= 0.6.0
rest-client < 1.7.0, >= 1.0.4
那它就应该起作用了

如果您再次遇到类似的问题,rubygems.org是一个很好的地方,可以了解事物所要求的依赖性

gem install ohai -v 7.2.0