Created
November 7, 2011 03:20
-
-
Save robzolkos/1344111 to your computer and use it in GitHub Desktop.
Prawn error with image cells
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@pdf = Prawn::Document.new(:margin=>0) | |
image = "#{Prawn::BASEDIR}/data/images/prawn.png" | |
@imgcell = Prawn::Table::Cell.make(@pdf, :image=>image) | |
ArgumentError: Content type not recognized: nil | |
from /Users/rzolkos/.rvm/gems/ruby-1.9.2-p180/gems/prawn-0.12.0/lib/prawn/table/cell.rb:127:in `make' | |
from (irb):6 | |
from /Users/rzolkos/.rvm/rubies/ruby-1.9.2-p180/bin/irb:16:in `<main>' |
This error occured due to using v0.12 of the gem instead of master. Master has support for images inside table cells.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The prawn.png image goes exist. In IRB, the 2nd line returns the full path to the prawn.png file. As it should.