user2284821
user2284821

Reputation: 431

Rails I18n errors parsing simple YAML file

I'm just starting to use Rails I18n a with very basic task and I'm getting a confusing error message:

can not load translations from c:/Sites/usrochr/config/locales/en.yml: #<Psych::SyntaxError: (c:/Sites/usrochr/config/locales/en.yml): couldn't parse YAML at line 5 column 2>

My YAML file is [very basic] config/locales/en.yml [i don't see the syntax error]:

en:
  users:
    title: "this is english"

and the code calling it in the views/users/index.html.erb file is also simple :

    <hr><%= t "users.title" %><hr>

fyi -i am running ruby 1.9.3 and rails 3.2.7. Not sure where i have gone astray.....

Upvotes: 0

Views: 730

Answers (1)

BroiSatse
BroiSatse

Reputation: 44725

I said it as a comment, but will re-post it so the question might be marked as solved:

YAML is parsed using whitespaces, hence there should be no tabs in there (AFAIK it should also work with tabs only - no mixes though)

Upvotes: 2

Related Questions