小编elr*_*red的帖子

如何设置对Chef库加载配方时不存在的Ruby库的依赖?

场景:

  • 方法1:下载档案,提取档案.提供一个CLI,它也定义了一个Ruby库.
  • 方法2:利用上述库中的Ruby API.

在recipe1/recipes/default.rb中:

.. do work
node[:recipe1][:filePath] = ".." #path to file
Run Code Online (Sandbox Code Playgroud)

在recipe2/recipes/default.rb中:

require node[:recipe1][:filePath]/lib/Library
.. do work
Run Code Online (Sandbox Code Playgroud)

但是,在加载食谱时,厨师宣布:

[Wed, 17 Aug 2011 19:32:23 +0800] DEBUG: Loading cookbook apache2's definitions from /var/chef/cookbooks/apache2/definitions/web_app.rb
[Wed, 17 Aug 2011 19:32:23 +0800] DEBUG: Loading cookbook apache2's definitions from /var/chef/cookbooks/apache2/definitions/apache_module.rb
[Wed, 17 Aug 2011 19:32:23 +0800] DEBUG: Loading Recipe Recipe1 via include_recipe
[Wed, 17 Aug 2011 19:32:23 +0800] DEBUG: Found recipe default in cookbook Recipe1
[Wed, 17 Aug 2011 19:32:23 +0800] ERROR: Running …
Run Code Online (Sandbox Code Playgroud)

ruby recipe chef-infra chef-recipe

5
推荐指数
1
解决办法
1462
查看次数

标签 统计

chef-infra ×1

chef-recipe ×1

recipe ×1

ruby ×1