wycats/thor — Issue #185: A error at method print_table
Author: coolesting
Created: 2011-10-19 08:40:10+00:00
State: open

I have the array of hash below

rows = [["auth"], ["aid", "integer", "integer", "true", "true", ""], ["name", "string", "varchar(255)", "true", "false", ""], ["pawd", "string", "varchar(255)", "true", "false", ""], ["email", "string", "varchar(255)", "true", "false", ""], ["level", "integer", "integer", "true", "false", ""], ["lists"], ["lid", "integer", "integer", "true", "true", ""], ["name", "string", "varchar(255)", "true", "false", ""], ["pages"], ["pid", "integer", "integer", "true", "true", ""], ["title", "string", "varchar(255)", "true", "false", ""], ["description", "string", "varchar(255)", "true", "false", ""], ["level", "integer", "integer", "true", "false", ""], ["posts"], ["pid", "integer", "integer", "true", "true", ""], ["body", "string", "text", "true", "false", ""], ["aid", "integer", "integer", "true", "false", ""]]

print_table(rows)

The error message

/home/app/ruby/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/shell/basic.rb:120:in `print_table': undefined method `insert' for nil:NilClass (NoMethodError)
from /home/app/ruby/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/shell.rb:69:in `print_table'