[chef] Re: ruby syntax issue or may be chef command


Chronological Thread 
  • From: Marc Paradise < >
  • To:
  • Subject: [chef] Re: ruby syntax issue or may be chef command
  • Date: Wed, 30 Oct 2013 08:08:57 -0400


Hi Manoj, it looks like you're assigning a string to node['account_deploy'] via '.last': .

    deploy = line.split(':').last
    deploy = deploy.gsub(/\n/," ")
    node.set['account_deploy']=deploy

And then calling .each on it, which is not a member of String:  
 
node['account_deploy'].each do |x|


[2013-10-30T01:45:07-07:00] FATAL: NoMethodError: undefined method `each' for "\"acc1\",\"acc2\" ":String



--
Marc Paradise 
Software Engineer
Opscode

Twitter: @MarcParadise
freenode: mparadise




Archive powered by MHonArc 2.6.16.

§