PDFKit Fork() Function Unimplemented Error - HELP!

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:into_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:incall’
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:incall’
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:incall’
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:incall’
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:incall’
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:inrun’
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:incall’
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:ineach’
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:incall’
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:incall’
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:inprocess_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:inprocess_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:ininitialize’
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:inrun’
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:innew’
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:inrun’
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:inrequire’
./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

On Aug 3, 6:43 pm, Dylan M. [email protected] 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

Fred

Frederick C. wrote:

On Aug 3, 6:43�pm, Dylan M. [email protected] 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

Fred

Great. What file would I edit to do this?

Thanks,
dwmcc

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs