Posted almost 11 years ago. Visible to the public.

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

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

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
Growing Rails Applications in Practice
Check out our new e-book:
Learn to structure large Ruby on Rails codebases with the tools you already know and love.

Owner of this card:

Henning Koch
Last edit:
over 7 years ago
by Emanuel De
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Henning Koch to makandra dev
This website uses short-lived cookies to improve usability.
Accept or learn more