2012-09-14 2 views
0

레일 응용 프로그램을위한 개발 환경을 설정하기 위해 Vagrant/Chef를 사용하려고 할 때 오류가 발생합니다. opscode에서 제공하는 응용 프로그램 요리 책에서 오류가 발생하지만이를 파악할 수는 없습니다. 구성 설정이 누락되었다고 가정하고 있지만 문서는 매우 희소합니다. 오류 및 관련 파일에 대한 자세한 내용은 아래에 나와 있습니다.Chef/Vagrant를 사용하여 가상 시스템에 레일 응용 프로그램을 배포하는 중 오류가 발생했습니다.

I 받고있어 오류에 대한 로그 : 내 Cheffile

. 
. 
. 
[Fri, 14 Sep 2012 16:25:13 +0000] INFO: execute[passenger_module] ran successfully 
[Fri, 14 Sep 2012 16:25:13 +0000] INFO: Processing template[/etc/apache2/mods-available/passenger.load] action create (passenger_apache2::mod_rails line 28) 
[Fri, 14 Sep 2012 16:25:13 +0000] INFO: Processing template[/etc/apache2/mods-available/passenger.conf] action create (passenger_apache2::mod_rails line 37) 
[Fri, 14 Sep 2012 16:25:13 +0000] INFO: Processing execute[a2enmod passenger] action run (passenger_apache2::mod_rails line 38) 
[Fri, 14 Sep 2012 16:25:13 +0000] INFO: Processing directory[/vagrant/rails] action create (/vagrant/cookbooks/application/providers/default.rb line 75) 
[Fri, 14 Sep 2012 16:25:13 +0000] INFO: directory[/vagrant/rails] owner changed to 998 
[Fri, 14 Sep 2012 16:25:13 +0000] INFO: directory[/vagrant/rails] group changed to 33 
[Fri, 14 Sep 2012 16:25:13 +0000] INFO: directory[/vagrant/rails] mode changed to 755 
[Fri, 14 Sep 2012 16:25:13 +0000] INFO: Processing directory[/vagrant/rails/shared] action create (/vagrant/cookbooks/application/providers/default.rb line 82) 
[Fri, 14 Sep 2012 16:25:13 +0000] INFO: directory[/vagrant/rails/shared] owner changed to 998 
[Fri, 14 Sep 2012 16:25:13 +0000] INFO: directory[/vagrant/rails/shared] group changed to 33 
[Fri, 14 Sep 2012 16:25:13 +0000] INFO: directory[/vagrant/rails/shared] mode changed to 755 
[Fri, 14 Sep 2012 16:25:13 +0000] INFO: Processing ruby_block[basic-rails before_deploy] action create (/vagrant/cookbooks/application/providers/default.rb line 107) 
[Fri, 14 Sep 2012 16:25:13 +0000] INFO: Processing application_ruby_rails[basic-rails] action before_deploy (basic-rails::default line 109) 
[Fri, 14 Sep 2012 16:25:13 +0000] INFO: Processing application_ruby_passenger_apache2[basic-rails] action before_deploy (basic-rails::default line 109) 
[Fri, 14 Sep 2012 16:25:13 +0000] ERROR: application_ruby_passenger_apache2[basic-rails] (basic-rails::default line 109) has had an error 
[Fri, 14 Sep 2012 16:25:13 +0000] ERROR: ruby_block[basic-rails before_deploy] (/vagrant/cookbooks/application/providers/default.rb line 107) has had an error 
[Fri, 14 Sep 2012 16:25:13 +0000] ERROR: ruby_block[basic-rails before_deploy] (/vagrant/cookbooks/application/providers/default.rb:107:in `before_deploy') had an error: 
ruby_block[basic-rails before_deploy] (/vagrant/cookbooks/application/providers/default.rb line 107) had an error: Chef::Exceptions::ValidationFailed: application_ruby_passenger_apache2[basic-rails] (basic-rails::default line 109) had an error: Chef::Exceptions::ValidationFailed: Option cookbook must be a kind of String! You passed :"basic-rails". 

내용 - 요리 책 검색 도서관에서 사용 :

#!/usr/bin/env ruby 
#^syntax detection 

site 'http://community.opscode.com/api/v1' 

#Provided Cookbooks 

#cookbook 'apt', 
# git: 'https://github.com/fnichol/chef-apt' 
cookbook 'apt' 
cookbook 'git', 
    git: 'https://github.com/fnichol/chef-git.git' 
cookbook 'build-essential' 
cookbook 'rvm', 
    git: 'git://github.com/fnichol/chef-rvm.git', ref: 'v0.9.0' 
cookbook 'application', 
    git: 'https://github.com/opscode-cookbooks/application' 
cookbook 'application_ruby', 
    git: 'https://github.com/opscode-cookbooks/application_ruby' 
#Custom cookbook 
cookbook 'basic-rails', 
    path: '~/.chef/cookbooks/basic-rails' 

내용을 Vagrantfile :

# -*- mode: ruby -*- 
# vi: set ft=ruby : 

Vagrant::Config.run do |config| 
    config.vm.box = "precise64" 
    config.vm.box_url = "http://files.vagrantup.com/precise64.box" 
    config.vm.customize ["modifyvm", :id, "--memory", 1024] 
    #config.vm.network :hostonly, "33.33.33.10" 

    config.vm.provision :chef_solo do |chef| 
    chef.cookbooks_path = ["cookbooks"] 
    chef.add_recipe "apt" 
    chef.add_recipe "git" 
    chef.add_recipe "build-essential" 
    chef.add_recipe "rvm::vagrant" 
    chef.add_recipe "rvm::system" 
    chef.add_recipe "basic-rails" #Once this included I get the error 
    end 
end 
요리 책은 본질적으로 0

기본 레일이 개 파일에 대한 수정을 당신이 만들 명령을 얻을 표준 하나 :

metadata.rb

depends "application" 
depends "application_ruby" 
maintainer  "Noone" 
maintainer_email "YOUR_EMAIL" 
license   "All rights reserved" 
description  "Installs/Configures basic-rails" 
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) 
version   "0.1.0" 

default.rb

user "www-user" do 
    system true 
    shell "/bin/false" 
end 
group "www-data" do 
    action :modify 
    members "www-user" 
    append true 
end 

application "basic-rails" do 
    path "/vagrant/rails" 
    owner "www-user" 
    group "www-data" 

    repository #Insert a git repository here containing a rails app, I'm using a private one 
    revision "production" 

    rails do 
    # Rails-specific configuration 
    name "basic-rails" 
    end 

    passenger_apache2 do 
    # Passenger-specific configuration 
    end 
end 
+0

이 풀 요청은 버그를 수정합니다 : https://github.com/opscode-cookbooks/application_ruby/pull/11 – sborsje

답변

0

Chef 10.14로 업데이트하면 문제가 해결됩니다.

관련 문제