我已经下载了Chef Development Kit,我正在尝试写一本厨师食谱。我已完成berks init
,然后berks install
。无论是否指定任何依赖项,它在查找U:时都会失败。它在寻找什么,为什么?我确实有一个网络U:,但现在已经取消映射以试图阻止它,但我看不出为什么berkshelf无论如何都要看那里。
编辑:应该在Windows 7的盒子上提及我。
Resolving cookbook dependencies...
Fetching 'mycookbook' from source at .
Fetching cookbook index from https://supermarket.getchef.com...
C:/opscode/chefdk/embedded/lib/ruby/2.0.0/fileutils.rb:242:in 'mkdir': No such file or directory - U: (Errno::ENOENT)
from C:/opscode/chefdk/embedded/lib/ruby/2.0.0/fileutils.rb:242:in 'fu_mkdir'
from C:/opscode/chefdk/embedded/lib/ruby/2.0.0/fileutils.rb:219:in 'block (2 levels) in mkdir_p'
from C:/opscode/chefdk/embedded/lib/ruby/2.0.0/fileutils.rb:217:in `reverse_each'
from C:/opscode/chefdk/embedded/lib/ruby/2.0.0/fileutils.rb:217:in `block in mkdir_p'
from C:/opscode/chefdk/embedded/lib/ruby/2.0.0/fileutils.rb:203:in `each'
from C:/opscode/chefdk/embedded/lib/ruby/2.0.0/fileutils.rb:203:in `mkdir_p'
from c:/opscode/chefdk/embedded/apps/berkshelf/lib/berkshelf/cookbook_store.rb:147:in `initialize_filesystem'
from c:/opscode/chefdk/embedded/apps/berkshelf/lib/berkshelf/cookbook_store.rb:46:in `initialize'
from c:/opscode/chefdk/embedded/apps/berkshelf/lib/berkshelf/cookbook_store.rb:15:in `new'
from c:/opscode/chefdk/embedded/apps/berkshelf/lib/berkshelf/cookbook_store.rb:15:in `instance'
from c:/opscode/chefdk/embedded/apps/berkshelf/lib/berkshelf/resolver/graph.rb:6:in `populate_store'
from c:/opscode/chefdk/embedded/apps/berkshelf/lib/berkshelf/resolver.rb:73:in `resolve'
from c:/opscode/chefdk/embedded/apps/berkshelf/lib/berkshelf/installer.rb:174:in `install_from_universe'
from c:/opscode/chefdk/embedded/apps/berkshelf/lib/berkshelf/installer.rb:39:in `run'
from c:/opscode/chefdk/embedded/apps/berkshelf/lib/berkshelf/berksfile.rb:371:in `install'
from c:/opscode/chefdk/embedded/apps/berkshelf/lib/berkshelf/cli.rb:143:in `install'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from c:/opscode/chefdk/embedded/apps/berkshelf/lib/berkshelf/cli.rb:52:in `dispatch'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.0.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from c:/opscode/chefdk/embedded/apps/berkshelf/lib/berkshelf/cli.rb:27:in `execute!'
from c:/opscode/chefdk/embedded/apps/berkshelf/bin/berks:5:in `<top (required)>'
from C:/opscode/chefdk/bin/berks:37:in `load'
from C:/opscode/chefdk/bin/berks:37:in `<main>'`
答案 0 :(得分:1)
事实证明,我遇到的问题与Vagrant Berkshelf - Shelf Path?中提到的问题相同。我不知道,我的HOMEDRIVE设置为U:,因此需要使用BERKSHELF_PATH环境变量。将此设置为任何现有文件夹都可以使安装成功完成。
为了完整性:
set BERKSHELF_PATH=C:\Berks
或者当然是通过控制面板进行操作,因此它仍然存在。