Read more

Fix: "undefined method `bytesize' for #<Array>"

Henning Koch
August 30, 2011Software engineer at makandra GmbH

I believe that when WEBrick has trouble bringing up your Rails application, the WEBrick component that is supposed to print you a pretty error message has a bug and sometimes fails with this message:

"undefined method `bytesize' for #<Array>"
Illustration online protection

Rails professionals since 2007

Our laser focus on a single technology has made us a leader in this space. Need help?

  • We build a solid first version of your product
  • We train your development team
  • We rescue your project in trouble
Read more Show archive.org snapshot

Starting the application in Passenger gave me a stacktrace in log/development.log that pointed to the actual problem.

Possible causes discovered by looking at the logs

  • A Rails plugin would require the sqlite3 gem, but that gem wasn't in the Gem bundle.
  • Rack only parses 65536 form params by default
  • Problem can occur when using the integrated Ruby Mine Debugger: Try to restart the server without debugging mode
Posted by Henning Koch to makandra dev (2011-08-30 14:17)