prawn - import image from URL
I got this working for me:
image open("https://driver.mbpgroup.eu/images/mbp_logo.jpg"), position: :right, width: 250
I could NOT get this to work for me (Prawn documentation):
image "https://driver.mbpgroup.eu/images/mbp_logo.jpg", position: :right, width: 250
you need to do the following -
require "open-uri"
Prawn::Document.generate(INSERT_YOUR_PDF_FILENAME_HERE) do
image open(INSERT_YOUR_URL_HERE)
end
Refer to http://rubydoc.info/gems/prawn/0.12.0/frames for more details.