Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/24.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
Ruby 无法在漫游框上运行unicorn应用程序服务器_Ruby_Git_Ubuntu_Vagrant_Chef Infra - Fatal编程技术网

Ruby 无法在漫游框上运行unicorn应用程序服务器

Ruby 无法在漫游框上运行unicorn应用程序服务器,ruby,git,ubuntu,vagrant,chef-infra,Ruby,Git,Ubuntu,Vagrant,Chef Infra,我有一个流浪者盒子,上面已经安装了带有ruby 2.0.0-p247的RVM。我已经把流浪汉盒子包装好,并把它作为基本盒子。 现在我正在尝试git克隆github私有repo并启动unicorn应用服务器,chef出错了,下面是错误的输出 ==> default: stdin: is not a tty ==> default: /opt/chef/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_

我有一个流浪者盒子,上面已经安装了带有ruby 2.0.0-p247的RVM。我已经把流浪汉盒子包装好,并把它作为基本盒子。 现在我正在尝试git克隆github私有repo并启动unicorn应用服务器,chef出错了,下面是错误的输出

==> default: stdin: is not a tty
==> default: /opt/chef/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find chef (>= 0) amongst [bundler-1.7.7, bundler-unload-1.0.2, executable-hooks-1.3.2, gem-wrappers-1.2.7, rubygems-bundler-1.4.4, rvm-1.11.3.9] (Gem::LoadError)
==> default:    from /opt/chef/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
==> default:    from /opt/chef/embedded/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in `gem'
==> default:    from /usr/bin/chef-solo:22:in `<main>'
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
==>默认值:stdin:不是tty
==>默认值:/opt/chef/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:to_specs中:在[bundler-1.7.7、bundler-unload-1.0.2、executable-hooks-1.3.2、gem-wrappers-1.2.7、rubygems-bundler-1.4.4.4、rvm-1.11.3.9]中找不到chef(>=0)(gem::LoadError)
==>默认值:from/opt/chef/embedded/lib/ruby/site\u ruby/1.9.1/rubygems/dependency.rb:256:in`to_spec'
==>默认值:from/opt/chef/embedded/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in'gem'
==>默认值:from/usr/bin/chef solo:22:in`'
厨师从未成功完成!任何错误都应在中可见
以上输出。请修改您的食谱,使其正确完成。

我无法调试该问题。它的ubuntu 14.04盒子。请帮助我使用插件安装Chef。这将为Chef提供独立于RVM设置的独立Ruby环境。

脚本似乎找不到Chef安装。尝试自己安装chef:
gem install chef
并再次运行脚本。RVM设置了环境变量,覆盖chef嵌入的ruby路径。尝试
env-chef-client
(您可能需要使用完整路径)在不使用env变量的情况下运行它,并让chef定义自己的路径。这应该是个好办法。我们在错误中看到的
/opt/chef/embedded/…
路径不是已经是OP case了吗?(真的在问流浪的omnibus是否会解决这个问题)如果是这样,我猜是
/usr/bin/chef solo
搞砸了什么,所以它不再正确地指向omnibus Ruby,或者从omnibus Ruby中移除宝石。RVM有时会用$GEM_HOME和$GEM_PATH来处理dick。是的,我不确定,但是我认为GEM_HOME和GEM_路径优先于chef ruby的静态信息。摆脱它们(使用
env-
)应该不会伤害chef并解决问题(至少不会破坏chef在我的盒子上运行(ubuntu 12.04,chef 11.16.4)。