I am using Prawn 0.12.0 in a Rails 3.2.12 app.
If I have an image on my local server it can show in a standard rails view, and I can also have it shown in a Prawn PDF using the following code
@logo = company.logo_url(:large).to_s
image @logo, :fit => [83.mm, 26.mm]
So far, so good. If I change the location of the image to be on Amazon S3 I get the following
I am able to show in a standard Rails view no problem If I try to display the image in a Prawn pdf I get the following error
Argument error (https://mydomain.s3.amazonaws.com/uploads/company/logo/20/large_2275_logo.png not found):
And if I then copy and paste that url into a browser, the image shows fine.
So to recap...
- I am able to use the Prawn image command for a local image, indicating I am using the Prawn syntax correctly
- I can access an image on Amazon S3 using a direct browser and a Rails view, indicating that the URL is correct
- BUT, I can not access the image on Amazon S3 from Prawn
Has anyone seen anything similar, or have any suggestions?
Michael