Is my I18n gem tired of working late?

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:inload’
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:inblock 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:inload_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:inload_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:ineach’

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:inload’
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:inblock 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:inload_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’

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 M.
St: Larsgatan 50, 58224 Linkping, Sweden
Phone: +46708371202

28 dec 2010 kl. 09.32 skrev Erwin:

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 …)

That is really nice to hear


Check out http://www.moneytoplist.com/ residual affiliate
programs and get recurring money.