使用cookbook安装nginx。编译乘客错误

时间:2014-10-01 08:48:07

标签: nginx chef passenger rbenv cookbook

我使用此nginx cookbook在vagrant中安装nginx。

运行命令knife solo cook user@ip时,我收到以下错误:

checking for getaddrinfo() ... found
configuring additional modules
adding module in /opt/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/passenger-4.0.52/ext/nginx
*** The Phusion Passenger support files are not yet compiled. Compiling them for you... ***
*** Running 'rake nginx CACHING=false' in /opt/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/passenger-4.0.52/ext/nginx... ***
STDERR: /opt/chef/embedded/bin/rake:9:in `require': no such file to load -- rubygems (LoadError)
    from /opt/chef/embedded/bin/rake:9
---- End output of "bash"  "/tmp/chef-script20141001-14979-2i0uo6" ----

似乎/opt/chef/embedded/bin/rake犯了这个错误。我使用rbenv,因此使用rbenv的{​​{1}}是正确的。 rake错了。

跑完后:

/opt/chef/embedded/bin/rake

vagrant ssh cd /path/to/passenger rake nginx CACHING=false 成功且没有错误。

我的node.json:

knife solo cook user@ip

当乘客编译时,有谁知道如何解决{ "run_list": [ "recipe[rbenv]", "recipe[rbenv::ruby_build]", "recipe[install_rbenv_ruby]", "recipe[postgresql::server]", "recipe[nginx::source]" ], "rbenv": { "group_users": [ "vagrant" ] }, "nginx": { "version": "1.4.7", "passenger": { "version": "4.0.52", "gem_binary": "/opt/rbenv/versions/2.1.2/bin/gem", "root": "/opt/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/passenger-4.0.52", "ruby": "/opt/rbenv/versions/2.1.2/bin/ruby" }, "source": { "modules": [ "nginx::http_stub_status_module", "nginx::http_ssl_module", "nginx::http_gzip_static_module", "nginx::passenger" ] } } } 的问题?

我也可以添加配方来运行乘客comiple,但运行complie是花费很多时间。我怎么写rake阻止?

not_if

0 个答案:

没有答案