Forum: Rails I18n Is my I18n gem tired of working late ?

Ee0293412faca21e4ebf3326ed9d5f8c?d=identicon&s=25 Kad Kerforn (kadoudal)
on 2010-12-28 09:33
(Received via mailing list)
I don't know what could have modified the environment.. I did not
touch anything related to I18n..
testing in the console , I can see it's up and running , but something
is wrong in loading the yml files
( I tried with just one simple and basic yml file .. same issue),
where should I look for anything wrong ?

$ rails c
Loading development environment (Rails 3.0.3)
ruby-1.9.2-p0 > I18n.locale
 => :en
> I18n.back:Fallbacks)end(:include, I18n::Backend:
 => I18n::Backend::Simple
I18n.fallbacks.map('de' => 'en')
 => {"de"=>"en"}

BUT

ruby-1.9.2-p0 > I18n.t(:hello)
ArgumentError: syntax error on line 53, col 241: `'
  from /Users/yves/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/syck.rb:
135:in `load'
  from /Users/yves/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/syck.rb:
135:in `load'
  from /Users/yves/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/syck.rb:
146:in `block in load_file'
  from /Users/yves/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/syck.rb:
145:in `open'
  from /Users/yves/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/syck.rb:
145:in `load_file'
  from /Users/yves/.rvm/gems/ruby-1.9.2-p0@rails3/gems/i18n-0.5.0/lib/
i18n/backend/base.rb:170:in `load_yml'
  from /Users/yves/.rvm/gems/ruby-1.9.2-p0@rails3/gems/i18n-0.5.0/lib/
i18n/backend/base.rb:156:in `load_file'
  from /Users/yves/.rvm/gems/ruby-1.9.2-p0@rails3/gems/i18n-0.5.0/lib/
i18n/backend/base.rb:15:in `block in load_translations'
  from /Users/yves/.rvm/gems/ruby-1.9.2-p0@rails3/gems/i18n-0.5.0/lib/
i18n/backend/base.rb:15:in `each'
...

I also tried the date translation :

today = Time.now
 => 2010-12-28 09:29:51 +0100
ruby-1.9.2-p0 > I18n.l(today)
ArgumentError: syntax error on line 53, col 241: `'
  from /Users/yves/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/syck.rb:
135:in `load'
  from /Users/yves/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/syck.rb:
135:in `load'
  from /Users/yves/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/syck.rb:
146:in `block in load_file'
  from /Users/yves/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/syck.rb:
145:in `open'
  from /Users/yves/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/syck.rb:
145:in `load_file'
  from /Users/yves/.rvm/gems/ruby-1.9.2-p0@rails3/gems/i18n-0.5.0/lib/
i18n/backend/base.rb:170:in `load_yml'
05c3f39db309047f28628a223a757bec?d=identicon&s=25 Hans Marmolin (marmolin)
on 2010-12-28 10:05
(Received via mailing list)
You have some error on line 52 (or 53)  in your yaml file (I usually
forget a " at the end whle having one at the beginning or have some
forbidden yaml chr
test by deleting line 52 and 53
____________________________________________
Hans Marmolin
St: Larsgatan 50, 58224 Linkping, Sweden
Phone: +46708371202









28 dec 2010 kl. 09.32 skrev Erwin:
Ee0293412faca21e4ebf3326ed9d5f8c?d=identicon&s=25 Kad Kerforn (kadoudal)
on 2010-12-28 10:10
(Received via mailing list)
got it ...  I inserted a puts filepath when ruby was loading the
files ... and found the wrong file ..

missing space between the key and the value...
thanks
I upgraded my gems yesterday .. I was using I18n 0.4.2 in my gemfile
and upgraded to 0.5.0 so I was not sure where the error could come
from...
Happy New Year to Sweden !  ( I love Stockholm... been there
sailing ...)
Be0e34508f1c13b3d4753c29b9267cee?d=identicon&s=25 Black Mt (black7mt38rpke4p)
on 2010-12-28 20:50
That is really nice to hear

______________________
Check out http://www.moneytoplist.com/ residual affiliate
programs and get recurring money.
This topic is locked and can not be replied to.