I tried to create a ticket for this, but it seems like one needs some special privileges to do that, so...
I've this problem where globalize throws an exception in one of my views. I found that the reason for that is a boolean value (instead of string) in default Rails locale file.
Default english locale file activesupport-2.2.2\lib\active_support\locale\en.yml contains sth like this:
# Used in array.to_sentence.
support:
array:
sentence_connector: "and"
skip_last_comma: false
Notice that the ''skip_last_comma'' value is not a string - it's a boolean.
Now, when to_sentence method in activesupport-2.2.2/lib/active_support/core_ext/array/conversions.rb calls I18n.translate(:'support.array.skip_last_comma', :locale => options[:locale]) it fails in vendor/plugins/globalize2/lib/globalize/backend/static.rb:32:in 'interpolate' with:
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.replace
Here's a full stack trace:
vendor/plugins/globalize2/lib/globalize/backend/static.rb:32:in `interpolate'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/i18n/backend/simple.rb:41:in `translate'
vendor/plugins/globalize2/lib/globalize/backend/static.rb:17:in `translate'
vendor/plugins/globalize2/lib/globalize/backend/static.rb:15:in `each'
vendor/plugins/globalize2/lib/globalize/backend/static.rb:15:in `translate'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/i18n.rb:160:in `translate'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/core_ext/array/conversions.rb:14:in `to_sentence'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/associations.rb:35:in `initialize'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/reflection.rb:276:in `new'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/reflection.rb:276:in `check_validity!'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/associations/has_many_through_association.rb:5:in `initialize'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/associations.rb:1297:in `new'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/associations.rb:1297:in `subscribers'
app/views/elements/_subscribers.html.erb:13