Psych::SyntaxError: did not find expected key while parsing a block mapping at


This post is kind of note to self. This error will show in Rails when you have syntax error within your YAML translation files. But. Message shows line and column number but not exactly where error is but the parent entry location, so error is hiding somewhere else.

In my case that was string closed into quotes and dot after quote and it was located several lines beneath line shown in error message.

lev1:
  lev2:
   s1: Text
   s2: Text
   s3: "Text %{title}".

Error message would show lev2 as place of problem…


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.