I\'m trying to understand the Prawn pdf gem.
I was able to make it generate a pdf. Every gem in the gemfile included:
gem \'mysql\', \'~> 2.8.1\'
Try this:
def index pdf = Prawn::Document.new pdf.text "Hello World" send_data pdf.render, :filename => "x.pdf", :type => "application/pdf" end
That said, for anything but a trivial PDF you will probably want to generate it outside the controller somewhere.