rubysyntaxchef-infrayumaws-opsworks

OpsWorks Chef: Cannot compile yum cookbook due to old Ruby (1.8.7)


I know in OpsWorks, Ruby version can be changed using custom Chef JSON like one in this topic.

But the problem is, before the new Ruby is installed, the default one (1.8.7) is used to compiled cookbooks. And Ruby version 1.8.7 cannot understand this code style (see here):

name: 'value',

I think it only accepts this style:

:name => "value",

Any suggestion to solve this?

Thank you.

UPDATE #1:

A temporary workaround for this: I checked out an older version of the yum cookbook, where the code is still valid for old Ruby.

UPDATE #2:

If I could use Chef-embedded Ruby then problem will be solved. Could anyone show how to use that embedded Ruby version? Thank you.


Solution

  • OpsWorks now supports Chef 11.10, Ruby 2.0, berkshelf, data bags, and search - this should solve your issue https://aws.amazon.com/blogs/aws/aws-opsworks-now-supports-chef-1110