Forum: Ruby Problem with using YAML for configuration files

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Fc761ccaf6c0d7d977e2959f9bfebd06?d=identicon&s=25 Eli Bendersky (eliben)
on 2007-05-12 10:46
(Received via mailing list)

I'm using YAML for configuration files in my current Ruby application,
and the yaml.rb module to load them (YAML::load is about all I use).

One problem I ran into is error reporting, on the semantic level (not
YAML errors). Say a user makes an error in some configuration item,
and I want to emit a useful error message that will guide him to the
problem. This isn't easy at all with YAML, since after YAML::load all
I have is a hash table, completely detached from the actual
configuration file. And I'd really want to let the user know, for
instance, on which line the error occurred.

This is probably a general YAML problem rather than a Ruby problem,
but I'd still like to ask here whether anyone ever encountered this ?
What are the solutions, in your opinion ?

Thanks in advance
7a03066e8719f4d938bf622351ce4e7b?d=identicon&s=25 unknown (Guest)
on 2007-05-12 10:47
(Received via mailing list)
dear sender,
i´m out of the office until may 29th.
your email will not be forwarded.
for urgent stuff please contact
kind regards,
This topic is locked and can not be replied to.