Skip to content

Instantly share code, notes, and snippets.

View andreguipeil's full-sized avatar

André Guimarães Peil andreguipeil

View GitHub Profile
@omgreenfield
omgreenfield / downloading_pdfs.markdown
Last active February 10, 2022 18:17
Generating and Download PDF's in Rails (Windows)

Generating and Downloading PDF's in Rails (Windows)

I had a lot of trouble trying to get one of my Rails apps to accomplish this common task. For one thing, my dev box runs Windows 7, which notoriously does not play nicely with Ruby on Rails. Another thing... all the instructions/tutorials/document for the gem I'm using, Wicked PDF, were either incomplete or, for some reason or another, didn't work for me.

That's all to say, here are the steps I took, and I hope they will help someone.

I used the Wicked PDF gem. Ryan Bates over at RailsCasts goes over using PDFKit, but this writeup will be all about Wicked PDF.

These next steps I got straight from the instructions on the GitHub page: