Hello,
We have a method which converts a PDF from the filesystem to a
scaled JPEG data stream:
def lowres_jpeg_data
image = Magick::ImageList.new self.class.base_path + "/#{id}.pdf"
image.scale!(1000,1000)
image.format = 'JPEG'
image.to_blob
end
The unit test passes:
def test_lowres_jpeg_data
expected = File.read RAILS_ROOT + '/test/fixtures/images/scales_and_crops/1_lowres.jpg'
image = Image.find 1
assert_equal expected, image.lowres_jpeg_data
end
However, when the method is called from the application running under
the webrick server in development mode we hit the following exception
using the same PDF file.
Magick::ImageMagickError (Postscript delegate failed `./var/cache/1.pdf': ):
How can this work in a test but then not in the application?
OS X server 10.4.3
rmagick (1.9.3)
rails (0.14.2)
AFPL Ghostscript 8.51 (2005-04-18)
ImageMagick graphics/ImageMagick 6.2.4-3