From: Kamarulnizam Rahim Date: 2011-01-27T10:48:18+09:00 Subject: Re: writing on yaml file When i load the following code: convert_yaml = YAML::load_file('nizam.yaml') pp convert_yaml["System"]["Environmental"]["children"][2]["children"] nizam = [{"name"=>"nizam", "type"=>"Objective", "subtype"=>"None", "components"=> [{"type"=>"ContentBox", "title"=>"Audit", "args"=>{:content=>"None\n"}}, {"type"=>"ChildListingComponent", "title"=>"Current Targets for the Audit Objective:"}]}] File.open("nizam.yaml", "w"){|f| YAML.dump(nizam, f)} This error appears: C:/Users/Hekmatyer/Documents/NetBeansProjects/Nizam_BARU/lib/Environmental.rb:167:in `[]': can't convert String into Integer (TypeError) What seems to be the problem? Thanks Nizam -- Posted via http://www.ruby-forum.com/.