0

I have two lib classes in my rails project. Both print out an error using the same syntax

I18n.t('.config_error')

One file it succeeds, the other file it fails with this error:

I18n::InvalidLocaleData: can not load translations from 
/home/hellebusch/.rvm/gems/ruby-2.2.0/gems/activesupport-4.2.0/lib/active_support/locale/en.yml: 
#<Errno::ENOENT: No such file or directory>

I cannot find the answer to this issue. Any insight would be great.

Paweł Dawczak
  • 9,519
  • 2
  • 24
  • 37
Busch
  • 857
  • 10
  • 29

1 Answers1

1

I believe the "." in I18n.t('.config_error') means I18n is looking for the config_error key in the namespace of the resource currently being rendered. So if you were rendering the Posts#show view, I18n would looking in the posts namespace - aka looking for a key that nested under the posts key.

Does that help?

Posting the classes/views which call I18n.t('.config_error') would be helpful.

dleve123
  • 100
  • 7