I18N: allocator undefined for Proc

Hello all,

I’m trying to translate my application using the I18N feature and it was
working fine until I added a couple of new entries to the en.yml files.
Now in every action in my application I always get the following error:

TypeError in Account#login
Showing app/views/account/login.rhtml where line #2 raised:
allocator undefined for Proc
Extracted source (around line #2):
1:
2: <% @title = I18n.t (‘text.login’) %>
3:


4:

<%= I18n.t (‘text.login’) %>


5:

Stack trace:

C:/Dev/Rails/ruby/lib/ruby/1.8/yaml.rb:133:in transfer' C:/Dev/Rails/ruby/lib/ruby/1.8/yaml.rb:133:innode_import’
C:/Dev/Rails/ruby/lib/ruby/1.8/yaml.rb:133:in load' C:/Dev/Rails/ruby/lib/ruby/1.8/yaml.rb:133:inload’
C:/Dev/Rails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb:189:in
load_yml' C:/Dev/Rails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb:176:insend’
C:/Dev/Rails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb:176:in
load_file' C:/Dev/Rails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb:13:inload_translations’
C:/Dev/Rails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb:13:in
each' C:/Dev/Rails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb:13:inload_translations’
C:/Dev/Rails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb:85:in
`init_translations’

Can anyone help me?

Best regards,
Migrate

On 24 Jun 2009, at 19:18, Hu Ma wrote:

Hello all,

I’m trying to translate my application using the I18N feature and it
was
working fine until I added a couple of new entries to the en.yml
files.
Now in every action in my application I always get the following
error:

sounds like there’s something funny in your yml file.

Fred

Hello Fred,

Sorry, beginner question: How can I check what wrong with the file?

Note: I’m not editing the files directly, I’m using translator plugin
(http://github.com/newsdesk/translate/tree/master) to do this so I don’t
know exactly where to look.

Thanks.
Best regards,
Migrate

Hello all,

I’ve found the problem. Don’t know why but the plugin add two entries
similar to the following to the yml file:

  long_ordinal: !ruby/object:Proc {}

Best regards,
Migrate