Hello All,
We''re working on a project on a Windows machine that will use PDFKit to
convert an HTML page to a PDF. I have followed all the instructions at
GitHub (http://github.com/jdpace/PDFKit), for installing wkhtmltopdf and
PDFKit, then creating the config file in
''config/initializers/pdfkit.rb''
and then finally, setting up Middleware for Rails apps in
''config/environment.rb''. We have done all of the following and
when we
run the server and append the ''.pdf'' extension, we receive a
500
Internal Server Error. Upon inspection of the console, we find a fork()
function unimplemented error. The console output is listed below:
---------------
/!\ FAILSAFE /!\ Tue Aug 03 08:28:19 -0700 2010
Status: 500 Internal Server Error
fork() function is unimplemented on this machine
C:/Ruby186/lib/ruby/gems/1.8/gems/pdfkit-0.4.3/lib/pdfkit/pdfkit.rb:60:in
`open''
C:/Ruby186/lib/ruby/gems/1.8/gems/pdfkit-0.4.3/lib/pdfkit/pdfkit.rb:60:in
`to_pdf''
C:/Ruby186/lib/ruby/gems/1.8/gems/pdfkit-0.4.3/lib/pdfkit/middleware.rb:23:in
`call''
C:/Ruby186/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/string_coercion.rb:25:in
`call''
C:/Ruby186/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/head.rb:9:in
`call''
C:/Ruby186/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/methodoverride.rb:24:in
`call''
C:/Ruby186/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/params_parser.rb:15:in
`call''
C:/Ruby186/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/session/cookie_store.rb:99:in
`call''
C:/Ruby186/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/failsafe.rb:26:in
`call''
C:/Ruby186/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/lock.rb:11:in
`call''
C:/Ruby186/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/lock.rb:11:in
`synchronize''
C:/Ruby186/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/lock.rb:11:in
`call''
C:/Ruby186/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/dispatcher.rb:114:in
`call''
C:/Ruby186/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/reloader.rb:34:in
`run''
C:/Ruby186/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/dispatcher.rb:108:in
`call''
C:/Ruby186/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/rails/rack/static.rb:31:in
`call''
C:/Ruby186/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/urlmap.rb:47:in
`call''
C:/Ruby186/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/urlmap.rb:41:in
`each''
C:/Ruby186/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/urlmap.rb:41:in
`call''
C:/Ruby186/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/rails/rack/log_tailer.rb:17:in
`call''
C:/Ruby186/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/content_length.rb:13:in
`call''
C:/Ruby186/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/chunked.rb:15:in
`call''
C:/Ruby186/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/mongrel.rb:67:in
`process''
C:/Ruby186/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:159:in
`process_client''
C:/Ruby186/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:158:in
`each''
C:/Ruby186/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:158:in
`process_client''
C:/Ruby186/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:285:in
`run''
C:/Ruby186/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:285:in
`initialize''
C:/Ruby186/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:285:in
`new''
C:/Ruby186/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:285:in
`run''
C:/Ruby186/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:268:in
`initialize''
C:/Ruby186/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:268:in
`new''
C:/Ruby186/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb:268:in
`run''
C:/Ruby186/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/mongrel.rb:38:in
`run''
C:/Ruby186/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/commands/server.rb:111
C:/Ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require''
C:/Ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require''
./script/server:3
-e:2:in `load''
-e:2
--------
If anyone could help us get around this problem to be able to convert an
HTML page to pdf, we would greatly appreciate it.
Thanks in advance,
-dwmcc
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
Frederick Cheung
2010-Aug-04 06:53 UTC
Re: PDFKit Fork() Function Unimplemented Error - HELP!
On Aug 3, 6:43 pm, Dylan Mccarthy <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hello All, > > We''re working on a project on a Windows machine that will use PDFKit to > convert an HTML page to a PDF. I have followed all the instructions at > GitHub (http://github.com/jdpace/PDFKit), for installing wkhtmltopdf and > PDFKit, then creating the config file in ''config/initializers/pdfkit.rb'' > and then finally, setting up Middleware for Rails apps in > ''config/environment.rb''. We have done all of the following and when we > run the server and append the ''.pdf'' extension, we receive a 500 > Internal Server Error. Upon inspection of the console, we find a fork() > function unimplemented error. The console output is listed below:Ruby on windows doesn''t have fork. You might try rewriting the bit that uses kernel.open to use IO.popen instead Fred> --------------- > /!\ FAILSAFE /!\ Tue Aug 03 08:28:19 -0700 2010 > Status: 500 Internal Server Error > fork() function is unimplemented on this machine > C:/Ruby186/lib/ruby/gems/1.8/gems/pdfkit-0.4.3/lib/pdfkit/pdfkit.rb:60:in > `open'' > C:/Ruby186/lib/ruby/gems/1.8/gems/pdfkit-0.4.3/lib/pdfkit/pdfkit.rb:60:in > `to_pdf'' > C:/Ruby186/lib/ruby/gems/1.8/gems/pdfkit-0.4.3/lib/pdfkit/middleware.rb:23: in > `call'' > C:/Ruby186/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/st ring_coercion.rb:25:in > `call'' > C:/Ruby186/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/head.rb:9:in > `call'' > C:/Ruby186/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/methodoverride.rb:24: in > `call'' > C:/Ruby186/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/pa rams_parser.rb:15:in > `call'' > C:/Ruby186/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/se ssion/cookie_store.rb:99:in > `call'' > C:/Ruby186/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/fa ilsafe.rb:26:in > `call'' > C:/Ruby186/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/lock.rb:11:in > `call'' > C:/Ruby186/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/lock.rb:11:in > `synchronize'' > C:/Ruby186/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/lock.rb:11:in > `call'' > C:/Ruby186/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/di spatcher.rb:114:in > `call'' > C:/Ruby186/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/re loader.rb:34:in > `run'' > C:/Ruby186/lib/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/di spatcher.rb:108:in > `call'' > C:/Ruby186/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/rails/rack/static.rb:31:i n > `call'' > C:/Ruby186/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/urlmap.rb:47:in > `call'' > C:/Ruby186/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/urlmap.rb:41:in > `each'' > C:/Ruby186/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/urlmap.rb:41:in > `call'' > C:/Ruby186/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/rails/rack/log_tailer.rb: 17:in > `call'' > C:/Ruby186/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/content_length.rb:13: in > `call'' > C:/Ruby186/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/chunked.rb:15:in > `call'' > C:/Ruby186/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/mongrel.rb:67 :in > `process'' > C:/Ruby186/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb: 159:in > `process_client'' > C:/Ruby186/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb: 158:in > `each'' > C:/Ruby186/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb: 158:in > `process_client'' > C:/Ruby186/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb: 285:in > `run'' > C:/Ruby186/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb: 285:in > `initialize'' > C:/Ruby186/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb: 285:in > `new'' > C:/Ruby186/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb: 285:in > `run'' > C:/Ruby186/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb: 268:in > `initialize'' > C:/Ruby186/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb: 268:in > `new'' > C:/Ruby186/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mingw32/lib/mongrel.rb: 268:in > `run'' > C:/Ruby186/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/mongrel.rb:38 :in > `run'' > C:/Ruby186/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/commands/server.rb:111 > C:/Ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in > `gem_original_require'' > C:/Ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in > `require'' > ./script/server:3 > -e:2:in `load'' > -e:2 > -------- > If anyone could help us get around this problem to be able to convert an > HTML page to pdf, we would greatly appreciate it. > > Thanks in advance, > -dwmcc > -- > Posted viahttp://www.ruby-forum.com/.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Dylan Mccarthy
2010-Aug-04 14:54 UTC
Re: PDFKit Fork() Function Unimplemented Error - HELP!
Frederick Cheung wrote:> On Aug 3, 6:43�pm, Dylan Mccarthy <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >> function unimplemented error. The console output is listed below: > Ruby on windows doesn''t have fork. You might try rewriting the bit > that uses kernel.open to use IO.popen instead > > FredGreat. What file would I edit to do this? Thanks, dwmcc -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.