Vote count:
0
I use this nginx cookbook to install nginx in vagrant.
When run command knife solo cook user@ip
, i got error below:
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" ----
It seems /opt/chef/embedded/bin/rake
make this error. I use rbenv
, so use rbenv
's rake
is correct. /opt/chef/embedded/bin/rake
is wrong.
After run:
vagrant ssh
cd /passenger/path
rake nginx CACHING=false
and knife solo cook user@ip
is success and no error.
My node.json:
{
"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"
]
}
}
}
Does anyone know how to fix rake
's problem when passenger compile?
I also can add recipe to run passenger comiple, but run complie is spend the very much time. How can i write not_if block?
bash 'compile_passenger_source' do
cwd "/opt/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/passenger-4.0.52/ext"
code <<-EOH
/opt/rbenv/versions/2.1.2/bin/rake nginx CACHING=false
EOH
end
asked 49 secs ago
use cookbook install nginx. compile passenger error
Aucun commentaire:
Enregistrer un commentaire