# PDFKit Fork() Function Unimplemented Error - HELP!

**URL:** <https://www.ruby-forum.com/t/pdfkit-fork-function-unimplemented-error-help/192661>\
**Category:** Rails\
**Created:** [August 3, 2010, 7:43pm UTC](https://www.ruby-forum.com/t/pdfkit-fork-function-unimplemented-error-help/192661 "2010-08-03T19:43:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmarkow](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bc8723/32.png) [@dmarkow](https://www.ruby-forum.com/u/dmarkow)\
**Post date:** [August 3, 2010, 7:43pm UTC](https://www.ruby-forum.com/t/pdfkit-fork-function-unimplemented-error-help/192661/1 "2010-08-03T19:43:51Z")

</div>

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 ([GitHub - jdpace/PDFKit: PDFKit has moved to https://github.com/pdfkit/PDFKit](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

---

<div class="post-metadata">

**Author:** ![dmarkow](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bc8723/32.png) [@dmarkow](https://www.ruby-forum.com/u/dmarkow)\
**Post date:** [August 4, 2010, 8:54am UTC](https://www.ruby-forum.com/t/pdfkit-fork-function-unimplemented-error-help/192661/2 "2010-08-04T08:54:50Z")

</div>

On Aug 3, 6:43 pm, Dylan M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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

---

<div class="post-metadata">

**Author:** ![dmarkow](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bc8723/32.png) [@dmarkow](https://www.ruby-forum.com/u/dmarkow)\
**Post date:** [August 4, 2010, 4:54pm UTC](https://www.ruby-forum.com/t/pdfkit-fork-function-unimplemented-error-help/192661/3 "2010-08-04T16:54:25Z")

</div>

Frederick C. wrote:

> On Aug 3, 6:43ï¿½pm, Dylan M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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
