Looks like you might be
missing a set of square brackets. I’m not familiar with the
cookbook, but the ruby you posted has default['rvm']['user_installs']
set to an array of hashes. So I think you want:
"override_attributes": {
"rvm": {
"user_installs": [{
"user": "www-data",
"default_ruby": "2.0.0p247",
"global_gems": [
{
"name": "rake"
},
{
"name": "bundler"
},
{
"name": "json"
},
{
"name": "mysql2"
},
{
"name": "libxml-ruby"
},
{
"version": "4.0.20",
"name": "passenger"
}
]
}]
}
}
Note the square brace on
the third and third-from-last line.
Also, if you fire up
irb, and require ‘json’ you can just call .to_json
on many ruby objects which might help in your conversion.
Matt Moretti