如何安装厨师库(不是食谱)需要的宝石?

发布于 2025-01-30 06:41:42 字数 405 浏览 2 评论 0原文

我有一个食谱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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文