- From: Adam Jacob <
>
- To:
- Subject: [chef] Re: Re: Re: 0.9.14 removed #symbolize_keys
- Date: Fri, 11 Mar 2011 11:17:19 -0800
Since we probably weren't loading active_support, could this have been
coming from extlib?
Adam
On Fri, Mar 11, 2011 at 7:28 AM, Daniel DeLeo
<
>
wrote:
>
On Friday, March 11, 2011 at 5:24 AM, Matt Ray wrote:
>
>
It looks like you were counting on Data Bags to be a Hash, they're now
>
proper Data Bag objects so you'll need to update your syntax. Chef
>
0.9.14 fixed it in this ticket:
>
http://tickets.opscode.com/browse/CHEF-1988
>
>
Data Bag Item defines all of the methods of Hash and forwards them to the
>
raw data object, so you can generally treat it like a Hash. What you're
>
seeing is that #symbolize_keys is a monkey patch from activesupport, which
>
DataBagItem does not implement. If you need to use activesupport's monkey
>
patches, grab raw_data and call those methods on it.
>
>
HTH,
>
--
>
Dan DeLeo
>
>
>
>
Thanks,
>
Matt Ray
>
Technical Evangelist | Opscode, Inc
>
E:
>
>
T: (512) 731-2218
>
Twitter, Github: mattray
>
>
>
>
On Fri, Mar 11, 2011 at 5:56 AM, Ash Berlin
>
<
>
>
wrote:
>
>
So on 0.9.12 this was working fine:
>
>
template "/etc/init.d/unicorn-#{app_id}" do
>
mode 0755
>
variables app.symbolize_keys.to_hash
>
source "init-unicorn.erb"
>
cookbook "application"
>
end
>
>
After upgrading to 0.9.14 however:
>
>
/var/cache/chef/cookbooks/application/recipes/unicorn.rb:63:in `from_file':
>
undefined method `symbolize_keys' for <Chef::DataBagItem:0x7f9419a8be98>
>
(NoMethodError)
>
>
Thoughts? Should this not have worked in the first place?
>
>
-ash
>
>
--
Opscode, Inc.
Adam Jacob, Chief Product Officer
T: (206) 619-7151 E:
Archive powered by MHonArc 2.6.16.