Search code examples
rubychef-infraaws-opsworkscookbook

Cookbook's deep dependency requires an unavailable Ruby version. How to circumvent via chef for Amazon Linux?


I'm a non-Ruby developer using Chef 11.10 on Amazon Linux AMI 2018.03, OpsWorks Agent v.3451.

My Route53 cookbook requires fog which requires fog-brightbox which requires an unspecified version of dry-inflector whose most recent version requires Ruby version 2.4 in its gemspec.

fog is installed via chef_gem which uses a separate version of Ruby reserved for use by the Chef client only, and it is not recommended to update this Ruby version as it may disable the Opsworks Agent.

Is the only way to get around this issue to fork and host each dependency in the chain, then force an earlier version of the deep dependency?


Solution

  • Version 0.1.2 of the dry-inflector gem doesn't require a specific version of Ruby.

    Just install the gem with that specific version as soon as possible on your machine.