I'm a newbie with Sinatra and prawn. I succeeded with erb and xmm/builder templates. Now trying to get pdf generation with prawn working.
Error received: Template engine not found: prawn
Code:
require 'rubygems'
require 'sinatra'
require 'sinatra/prawn'
set :prawn, { :page_layout => :portrait }
get '/pdf' do
content_type 'application/pdf'
prawn :pdf1
end
Thanks.
Found it: The gem from sbfaulkner doesn't work with current version of Sinatra.
Fix: install the forked gem from danielberkompas as follows:
See issue 6
Then the above code works fine.