I've run into this problem as well. I traced to to the following
entry in
activesupport-2.2.2/lib/active_support/locale/en.yml:
# Used in array.to_sentence.
support:
array:
sentence_connector: "and"
skip_last_comma: false
It seems some combination of rails2.2 and globalize2 can't handle the
false.
I worked around it by defining support.array.skip_last_comma to be a
string in my application locale files. Of course, this isn't correct
because it will evaluate as true now, but it hasn't caused me problems
yet and gets me past the error.
Lewis
> I'm trying to getglobalize2with the rails v2.2.0 tag to work, but
> get the following error.
>
> Is this a known problem (it worked with an older rails edge version)
> or is it related to our code?
>
> /Users/schmidp/Development/Netmonic/manager/vendor/plugins/globalize2/
> lib/globalize/backend/static.rb:31:in `interpolate': You have a nil
> object when you didn't expect it! (NoMethodError)
> You might have expected an instance of Array.
> The error occurred while evaluating nil.replace from /Users/schmidp/
> Development/Netmonic/manager/vendor/rails/activesupport/lib/
> active_support/vendor/i18n-0.0.1/i18n/backend/simple.rb:41:in
> `translate'
> from /Users/schmidp/Development/Netmonic/manager/vendor/plugins/globalize2/lib/globalize/backend/static.rb:16:in `translate'
> from /Users/schmidp/Development/Netmonic/manager/vendor/plugins/globalize2/lib/globalize/backend/static.rb:14:in `each'
> from /Users/schmidp/Development/Netmonic/manager/vendor/plugins/globalize2/lib/globalize/backend/static.rb:14:in `translate'