From: Calvin Nguyen Date: 2009-03-21T12:25:50+09:00 Subject: Re: YAML config files with environment specific settings Phlip wrote: >> error: Uncaught exception: syntax error on line 1, col 20: ` >> attachment_volume: >> \\atlas\transfer\greenlight\predevelopment\attachments' > > Is that a transmission error, or does \\atlas really start in the first > text > column? directly under the 'a' in attachment? > > Put it on the same line as volume:. > > Next, in terms of style, you should use / if at all possible. MS's > experiment > with \ has failed, and even their own tools respect /. That's a transmission error. Strange thing I just realized for me ( on windows) if i remove all whitespace, then the YAML config file load succeeds but my APP_CONFIG structure that loads up is nil. Here is how I'm loading up my hash: APP_CONFIG = YAML.load_file("#{RAILS_ROOT}/config/config.yaml")[RAILS_ENV] when i excecute this, the exception is thrown: self.volume = APP_CONFIG['attachment_volume'] What am I missing? -- Posted via http://www.ruby-forum.com/.