Frage

When I replace this line in the Gemfile

gem 'globalize3'

By this one:

gem 'globalize', '~> 3.0.0'

As suggested here: https://github.com/globalize/globalize, I got this error while starting Unicorn

From Unicorn log file

I, [2013-11-19T12:07:39.869767 #20032]  INFO -- : Refreshing Gem list
/usr/local/rvm/rubies/ruby-1.9.3-p429/lib/ruby/gems/1.9.1/gems/unicorn-4.6.3/lib/unicorn.rb:48: stack level too deep (SystemStackError)

I suppose that I have nothing special. I have configured this (below) to fallback pt-BR to en and vice-versa which works in development with the new globalize (It doesn't with Globalize3). However, I have commented these lines in production but the error persists.

config/application.rb

config.i18n.fallbacks = {'pt-BR' => 'en', 'en' => 'pt-BR'}
Globalize.fallbacks = {:en => [:en, :'pt-BR'], :'pt-BR' => [:'pt-BR', :en]}

config/environment.rb

require "i18n/backend/fallbacks"
I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks)

Any advices? I would appreciate any test that I can make to find the problem.

War es hilfreich?

Lösung

It seems that it is a Globalize bug.

It worked using

gem 'globalize', '3.0.0'

You can have more information on these links:

However, I don't know what to do the next time. I suppose that I should do the same thing (posting on SO and/or in the Gem issue queue)

Update

This solution is not needed anymore as the Globalize release 3.0.2 is working.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top