I just overcame a similar issue on Windows with images uploaded through Paperclip, because WickedPDF's wicked_pdf_image_tag helper requires the images to be in public/images.
I used the solution given here for that problem, but I still couldn't get the images to render in the PDF. Then I discovered that if I put the image into the public/images folder and referenced it that way, the wicked_pdf_image_tag helper rendered the image tag with forward slashes instead of backslashes after the 'file://'.
This is the helper method I ended up with, which replaces wicked_pdf_image_tag:
module ApplicationHelper
def wicked_pdf_image_tag_for_public(img, options={})
if img[0] == "/"
# Remove the leading slash
new_image = img.slice(1..-1)
image_tag "file:///#{Rails.root.join('public', new_image).to_s.gsub("/", "\\")}"
else
image_tag "file://#{Rails.root.join('public', 'images', img).to_s.gsub("/", "\\")}}", options
end
end
end