From: Arlen Christian Mart Cuss Date: 2007-11-11T06:34:14+09:00 Subject: Re: yaml error. dunno why Hi, On Sat, 2007-11-10 at 22:55 +0900, Junkone wrote: > i have a simple yml file and am trying to parse it. > > development: > TWSDirectory: E:\Jts\dlqkjifys\ > Second: E:\Jts\test\ > First, make sure your items are indented at the same level: development: TWSDirectory: E:\Jts\dlqkjifys\ Second: E:\Jts\test\ Notice the way "TWSDirectory" and "Second" have the same number of spaces before them. This may still not work. Have a look at this example: irb(main):008:0> YAML.load <<-YAML irb(main):009:0" abcdefg\ irb(main):010:0" hijkl irb(main):011:0" YAML => "abcdefghijkl" Your "\" at the end of the line is joining the two lines into one! Suffice to say, this works: irb(main):017:0> YAML.load < {"development"=>{"TWSDirectory"=>"E:Jtsdlqkjifys", "Second"=>"E:Jts \test"}} irb(main):022:0> > i get a error that i am not able to comprehend. pl help > irb(main):020:0> conf = YAML::load(File.open(RailsDirectory+ 'config/ > constants.y > ml')) > 'rgumentError: syntax error on line 5, col 12: ` Second: E:\Jts > \test\ > from e:/ruby/lib/ruby/1.8/yaml.rb:133:in `load' > from e:/ruby/lib/ruby/1.8/yaml.rb:133:in `load' > from (irb):20 > > Hope this helps, Arlen