如何安装厨师库(不是食谱)需要的宝石?
我有一个食谱foo
,它提供功能作为库(并且没有配方)。此功能需要REST-CLIENT
(以前是内置的厨师版本,但已删除)。显而易见的答案是将gem'ret-client'
添加到食谱元数据,但这会中断berks vendor
,因为REST-CLIENT
不是已安装,似乎也无法安装它。另一个明显的答案是在需要'REST-CLIENT'
之前立即添加Chef_gem
咒语,但由于它是库,而不是食谱chef_gem
不可呼应。如何确保foo
获取REST-CLIENT
在编译其库之前安装了而无需将其放在食谱元数据中?
I have a cookbook foo
that provides functionality as a library (and has no recipes). This functionality requires rest-client
(which used to be built-in to earlier Chef versions, but was removed). The obvious answer is to add a gem 'rest-client'
to the cookbook metadata, but this breaks berks vendor
because rest-client
is not installed and it seemingly cannot install it, either. The other obvious answer is to add a chef_gem
incantation immediately before require 'rest-client'
, but since it's a library and not a recipe chef_gem
isn't callable. How can I ensure that foo
gets rest-client
installed before its library is compiled without putting it in the cookbook metadata?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论