Group: http://groups.google.com/group/prawn-ruby/topics
- Prawn and nginx [2 Updates]
- [ANN] Prawn Hackfest @ BohConf / RailsConf (6/8, 6/9) [2 Updates]
Topic: Prawn and nginxHugo <hugo...@gmail.com> Jun 05 06:26AM -0700 ^
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
Anuj Dutta <dutta...@googlemail.com> Jun 05 04:11PM ^
Hello,
Does your prawn code work on its own? Just try doing that and narrow the problem down. Also, what version of passenger are you using?? It could be a passenger problem.
Sorry, could not be of much help.
Thanks.
Anuj
------------------
-----Original Message-----
From: Hugo <hugo...@gmail.com>
Date: Sat, 5 Jun 2010 06:26:02
To: Prawn<prawn...@googlegroups.com>
Subject: Prawn and nginx
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
Chris Schumann <chris.s...@gmail.com> Jun 04 09:51PM -0400 ^
On Thu, Jun 3, 2010 at 7:36 PM, Gregory Brown
> Hi folks,
> I have reserved slots for Prawn hacking at BohConf (the free
> unconference at RailsConf) from 8am to 1pm EDT:
I'm in Baltimore, and I'm ready to do some hacking on Sunday.
Anyone else up for that?
Chris
"Colin A. Bartlett" <colinb...@gmail.com> Jun 04 05:39PM -0700 ^
I contributed at the last hackfest (albeit minimally) and would be
happy to contribute again. I've actually been using Prawn extensively
on a project for the past week or two.
Colin
On Jun 3, 7:36 pm, Gregory Brown <gregory_br...@letterboxes.org>
wrote: