Concat, nil.<< and Rails 2.3.0RC1

When moving to Rails 2.3.0RC1 I get an error with concat!? I can’t
figure it out. See the dump below:

ActionView::TemplateError (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.<<) on line #158 of
app/views/places/show.html.erb:
158:


159:

<%= “What do you think about ‘%s’?” / @place %>


160: <% end -%>
161: <% form_for([@place, @review = Review.new]) do |f| %>
actionpack (2.3.0) lib/action_view/helpers/text_helper.rb:32:in

concat' actionpack (2.3.0) lib/action_view/helpers/form_helper.rb:252:inform_for’
app/views/places/show.html.erb:158

It seems to be something with form_for and blocks or something?! It
does
NOT appear in Rails 2.2.2 however :S

Any help is greatly appreciated!

On Feb 4, 2009, at 7:31 AM, Joost wrote:

158:


159:

<%= “What do you think about ‘%s’?” / @place %>

What’s this supposed to be? Is that / supposed to be % (for String#%)?

It seems to be something with form_for and blocks or something?! It
does
NOT appear in Rails 2.2.2 however :S

Any help is greatly appreciated!

Rob B. http://agileconsultingllc.com
[email protected]

Hmm… might be something that / …
It comes from deprecated Globalize (v1) that uses the “blabla %s
blabla” / ‘something’ to translate strings…

Any other ideas?

On Feb 4, 2009, at 12:33 PM, Joost wrote:

Hmm… might be something that / …
It comes from deprecated Globalize (v1) that uses the “blabla %s
blabla” / ‘something’ to translate strings…

Any other ideas?

OK, so Globalize defines a String#/ is it possible that it is not
finding a translation for the “blabla” and thus using a nil internally?

-Rob

Rob B. http://agileconsultingllc.com
[email protected]

I’ve overwritten the method to NOT return nil in any case. However the
error seems not to be in those calls. It’s more in blocks or
something. See below:

Showing app/views/layouts/_header.html.erb where line #4 raised:

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.<<

Extracted source (around line #4):

1:


2:

3:

4: <% form_tag(search_places_path, :method => :get) do -%>
5: <% with_options(:scope => [:form, :search_place]) do |i| -%>
6:

7:

Trace of template inclusion: app/views/layouts/site.html.erb

RAILS_ROOT: /Users/joost/Workspace/project
Application Trace | Framework Trace | Full Trace

/Users/joost/.gem/ruby/1.8/gems/actionpack-2.3.0/lib/action_view/
helpers/text_helper.rb:32:in concat' /Users/joost/.gem/ruby/1.8/gems/actionpack-2.3.0/lib/action_view/ helpers/form_tag_helper.rb:461:inform_tag_in_block’
/Users/joost/.gem/ruby/1.8/gems/actionpack-2.3.0/lib/action_view/
helpers/form_tag_helper.rb:39:in `form_tag’

I found it… it was Erubis that doesn’t work with Rails 2.2 and 2.3.