Ruby on Rails Saturday, May 1, 2010

On Apr 30, 7:16 pm, Kurt <k...@cissor.com> wrote:
> 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
> below).
>

There's only one place in the ruby C code I could find that raises
'string sizes too big'. It's raised in a string concatenation function
if the length of the existing string plus the length of what you're
concatenating exceeds LONG_MAX, ie 2^31-1 on a 32bit system. I'm not
sure why fields for would be attempting to concatenate two strings
with a combined length of 2GB.

Fred

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment