使用Vagrant和librarian-chef-nochef插件安装cookbook时出错

时间:2014-05-07 20:34:56

标签: windows chef vagrant librarian

我在Windows主机上使用Vagrant和librarian-chef-nochef插件。它工作正常,直到我添加一个与#34; git"我的Cheffile选项。像这样:

# Cheffile
site "http://community.opscode.com/api/v1"

cookbook "apt"
cookbook "nginx"
cookbook "nodejs", :github => "redguide/nodejs"

然后我收到一个关于缺少README.md文件的奇怪错误:

C:/Users/silentvick/.vagrant.d/gems/gems/librarian-chef-nochef-0.1.0/lib/librarian/chef/metadata.rb:15:in `instance_eval': No such file or directory - ./README.md (Errno::ENOENT)

我的配置:

  • Windows 7 x64
  • 使用librarian-chef-nochef插件的Vagrant 1.5.4

以下是完整报告:

> vagrant provision
==> default: Installing Chef cookbooks with Librarian-Chef...
C:/Users/silentvick/.vagrant.d/gems/gems/librarian-chef-nochef-0.1.0/lib/librarian/chef/metadata.rb:15:in `instance_eval': No such file or directory - ./README.md (Errno::ENOENT)
        from (eval):6:in `initialize'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-chef-nochef-0.1.0/lib/librarian/chef/metadata.rb:15:in `instance_eval'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-chef-nochef-0.1.0/lib/librarian/chef/metadata.rb:15:in `initialize'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-chef-nochef-0.1.0/lib/librarian/chef/manifest_reader.rb:28:in `new'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-chef-nochef-0.1.0/lib/librarian/chef/manifest_reader.rb:28:in `compile_manifest'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-chef-nochef-0.1.0/lib/librarian/chef/manifest_reader.rb:23:in `read_manifest'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-chef-nochef-0.1.0/lib/librarian/chef/source/local.rb:57:in `fetch_manifest_data'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-chef-nochef-0.1.0/lib/librarian/chef/source/local.rb:49:in `manifest_data'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-chef-nochef-0.1.0/lib/librarian/chef/source/local.rb:28:in `fetch_version'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/manifest.rb:121:in `fetch_version!'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/manifest.rb:113:in `fetched_version'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/manifest.rb:59:in `version'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/manifest.rb:97:in `satisfies?'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/dependency.rb:121:in `satisfied_by?'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:103:in `block in check_manifest'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:104:in `each'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:104:in `find'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:104:in `check_manifest'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:63:in `block inrecursive_resolve'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:154:in `block (3 levels) in resolving_dependency_map_find_manifests'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:187:in `block in scope_checking_manifest'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:223:in `scope'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:186:in `scope_checking_manifest'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:153:in `block (2 levels) in resolving_dependency_map_find_manifests'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:211:in `block in map_find'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:210:in `each'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:210:in `map_find'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:152:in `block in resolving_dependency_map_find_manifests'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:165:in `block (2 levels) in scope_resolving_dependency'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:179:in `block in scope_checking_manifests'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:223:in `scope'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:178:in `scope_checking_manifests'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:164:in `block in scope_resolving_dependency'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:223:in `scope'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:163:in `scope_resolving_dependency'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:151:in `resolving_dependency_map_find_manifests'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:62:in `recursive_resolve'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:70:in `block inrecursive_resolve'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:154:in `block (3 levels) in resolving_dependency_map_find_manifests'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:187:in `block in scope_checking_manifest'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:223:in `scope'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:186:in `scope_checking_manifest'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:153:in `block (2 levels) in resolving_dependency_map_find_manifests'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:211:in `block in map_find'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:210:in `each'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:210:in `map_find'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:152:in `block in resolving_dependency_map_find_manifests'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:165:in `block (2 levels) in scope_resolving_dependency'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:179:in `block in scope_checking_manifests'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:223:in `scope'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:178:in `scope_checking_manifests'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:164:in `block in scope_resolving_dependency'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:223:in `scope'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:163:in `scope_resolving_dependency'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:151:in `resolving_dependency_map_find_manifests'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:62:in `recursive_resolve'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:70:in `block inrecursive_resolve'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:154:in `block (3 levels) in resolving_dependency_map_find_manifests'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:187:in `block in scope_checking_manifest'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:223:in `scope'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:186:in `scope_checking_manifest'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:153:in `block (2 levels) in resolving_dependency_map_find_manifests'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:211:in `block in map_find'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:210:in `each'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:210:in `map_find'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:152:in `block in resolving_dependency_map_find_manifests'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:165:in `block (2 levels) in scope_resolving_dependency'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:179:in `block in scope_checking_manifests'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:223:in `scope'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:178:in `scope_checking_manifests'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:164:in `block in scope_resolving_dependency'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:223:in `scope'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:163:in `scope_resolving_dependency'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:151:in `resolving_dependency_map_find_manifests'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:62:in `recursive_resolve'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver/implementation.rb:50:in `resolve'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/resolver.rb:23:in `resolve'
        from C:/Users/silentvick/.vagrant.d/gems/gems/librarian-0.1.2/lib/librarian/action/resolve.rb:26:in `run'
        from C:/Users/silentvick/.vagrant.d/gems/gems/vagrant-librarian-chef-nochef-0.1.1/lib/vagrant-librarian-chef/action/librarian_chef.rb:24:in `call'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Users/silentvick/.vagrant.d/gems/gems/vagrant-cachier-0.7.1/lib/vagrant-cachier/action/configure_bucket_root.rb:20:in `call'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builder.rb:116:in `call'

        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/runner.rb:69:in `block in run'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/util/busy.rb:19:in `busy'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/runner.rb:69:in `run'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builtin/call.rb:51:in `call'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builder.rb:116:in `call'

        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/runner.rb:69:in `block in run'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/util/busy.rb:19:in `busy'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/runner.rb:69:in `run'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builtin/call.rb:51:in `call'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/warden.rb:34:in `call'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/builder.rb:116:in `call'

        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/runner.rb:69:in `block in run'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/util/busy.rb:19:in `busy'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/action/runner.rb:69:in `run'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/machine.rb:157:in `action'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/plugins/commands/provision/command.rb:35:in `block in execute'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/plugin/v2/command.rb:200:in `block in with_target_vms'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/plugin/v2/command.rb:194:in `each'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/plugin/v2/command.rb:194:in `with_target_vms'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/plugins/commands/provision/command.rb:34:in `execute'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/cli.rb:42:in `execute'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/lib/vagrant/environment.rb:248:in `cli'
        from C:/Program Files (x86)/Vagrant/embedded/gems/gems/vagrant-1.5.4/bin/vagrant:164:in `<main>'

2 个答案:

答案 0 :(得分:1)

如果metadata.rb文件需要自述文件(long_description IO.read(File.join(File.dirname( FILE ),'README.md')))这样的东西你可以使用带有文件内容的元数据在同一目录中创建自述文件

答案 1 :(得分:0)

问题在下一版 vagrant-librarian-chef-nochef 插件(0.1.2)中得到修复