LoadError: cannot load such file -- prawn/table
I had my pdfs running great the other day, but since the latest update(?), my pdfs are broken with this error message.
require 'open-uri'
require 'prawn/table'
pdf.bounding_box([300,330], :width => 250, :height => 400) do
table_data = [[Prawn::Table::Cell::Text.new( pdf, [0,0], :content => "<b>Cab Type: </b>", :inline_format => true), "#{@vehicle.cab_type.name if @vehicle.cab_type}"],
[Prawn::Table::Cell::Text.new( pdf, [0,0], :content => "<b>Wheelbase (mm):</b>", :inline_format => true), "#{@vehicle.wheelbase if @vehicle.wheelbase}"]]
pdf.table(table_data,:width => 250)
end
end
I think you'll get more chances to someone really looking into this if you reduce your problem to a assertable test case and include the least amount of well formatted code to reproduce the problem. Also you never included an error/stack trace. (Did you read the change log note about table being a separate gem now?)
Yeah, I'll rewrite! Thanks.
@MartinMcDermid: Sorry, I didn't notice in my (now deleted) comment that you are requiring "prawn/table". Make sure you also require "prawn" first, and that should solve the problem.
@sandal That's it running great! Yeah quite silly of me to miss that. Appreciate the help!