Semicolon in yaml file

How does one escape a semicolon in their database.yml file?
One of our passwords have an embedded “;” character.

me wrote:

How does one escape a semicolon in their database.yml file?
One of our passwords have an embedded “;” character.

semi-colons are not reserved words in yaml and therefore don’t need
escaping http://www.yaml.org/refcard.html

“text with embedded semi-colons such as ; and ; and even more ;”.to_yaml
=> “— text with embedded semi-colons such as ; and ; and even more
;\n”

hth

ilan

On Jan 22, 12:41 pm, me [email protected] wrote:

How does one escape a semicolon in their database.yml file?
One of our passwords have an embedded “;” character.

I’ve had trouble with certain characters in db passwords before too,
even characters that weren’t reserved or “special” for yaml. Wrapping
it in quotes seems to do the trick.


Justin B.
http://mega.blaix.com

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs