Our app is getting a “string sizes too big” error in an .erb file that
is trying to render a large block of checkboxes that represent color
attributes that belong_to the product being edited in this view. The
code worked fine when we had a small number of colors – now that the
number of colors is 750+, we get an error on the fields_for line (see
Since this sounds somewhat like some older memory leak issues, I
confirmed that our host, Engine Y., does not have an old Ruby
version (they are on 1.8.6 patch level 287). The same error occurs on
Mac OS/X with Ruby 1.8.6 patch 369.
I’ve had no luck searching for that error with “fields_for” or finding
any docs on size limitations inherent to fields_for.
Processing Admin::ProductsController#edit (for 184.108.40.206 at
2010-04-29 05:21:30) [GET]
Rendering template within admin/layouts/base
ActionView::TemplateError (string sizes too big) on line #67 of app/
66: <% previousObject = nil -%>
67: <% f.fields_for :prod_method_colors do |pmc| -%>
68: <% pmcObj = pmc.object %>
69: <%= "
" if previousObject ==
nil || (pmcObj.print_method != previousObject.print_method) %>
70: <% previousObject = pmcObj -%>