Hugo
unread,Jun 5, 2010, 9:26:02 AM6/5/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Prawn
Hi all,
I'm moving my application from a shared host to a VPS.
In the shared host I'm using Apache + Passenger + Rails and it works
fine.
In the VPS I'm using Nginx + Passenger + Rails and it does not work.
When I make a request to the server to create a pdf file it hangs. I
don't see any error in the log files. Can anyone help me?
Here is the code:
# rails action.
def teste
invoice = HelloReport.new
output = invoice.to_pdf
respond_to do |format|
format.pdf do
send_data (output, :filename => "hello.pdf", :type => "application/
pdf")
end
end
end
# pdf creator
class HelloReport < Prawn::Document
def to_pdf
text "Hello world"
font "Helvetica"
text "Book: title", :size => 16, :style => :bold, :spacing => 4
text "Author: author", :spacing => 16
text "Author: author222222", :spacing => 16
bounding_box [100, cursor], :width => 200, :height => 200 do
stroke do
circle_at [100,100], :radius => 100
line bounds.top_left, bounds.bottom_right
line bounds.top_right, bounds.bottom_left
end
end
render
end
end
Thanks.
Best regards,
Hugo