Prawn : undefined method `make_table'

require 'prawn' require 'prawn/core' require 'prawn/layout'

Prawn::Document.new do |pdf|     subtable = pdf.make_table([[ "foo", "bar" ], [ "baz", "bax" ]],                               :column_widths => [ 50, 50 ]) {         column(0).background_color = "808080"         cells.borders =     }

    table = pdf.make_table([[ "foo", "bar" ], [ "baz", subtable ]],                               :column_widths => [ 100, 100 ]) {         cells.border_width = 5     }     table.draw end

When i execute the above code i am getting below mentioned error:

e:/ruby/lib/ruby/gems/1.8/gems/prawn-core-0.8.4/lib/prawn/graphics/color.rb:72:i n `method_missing': undefined method `make_table' for #<Prawn::Document:0x2e4b95 0> (NoMethodError)         from border.rb:6         from e:/ruby/lib/ruby/gems/1.8/gems/prawn-core-0.8.4/lib/prawn/document. rb:238:in `'         from e:/ruby/lib/ruby/gems/1.8/gems/prawn-core-0.8.4/lib/prawn/document. rb:238:in `initialize'         from border.rb:5:in `new'         from border.rb:5

In apis it is mentioned that Prawn::Document object has method make_table.

I notice you are using prawn 0.8.4. This method make_table does not exist in prawn 0.8.4. You need to upgrade to something like prawn 0.10.2 and higher. If you have more prawn related questions, there also exists a prawn forum: prawn-ruby[AT]googlegroups[DOT]com, which can help you more.

Thanks,