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'
on 2010-12-28 09:33
on 2010-12-28 10:05
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:
on 2010-12-28 10:10
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 ...)
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.
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.