Usually it's important to specify the error received. In this case
though you can probably do it by passing a StringIO object that contains
the data as this will behave like you are passing a file (which image()
accepts as an alternative to a path).
E.g: pdf.image StringIO.new(c.data)
Regards,
Andrew