# Generating PDF- environment.rb problem

**URL:** <https://www.ruby-forum.com/t/generating-pdf-environment-rb-problem/196538>\
**Category:** Ruby-Forum\
**Created:** [December 12, 2007, 10:04am UTC](https://www.ruby-forum.com/t/generating-pdf-environment-rb-problem/196538 "2007-12-12T10:04:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![valerieloy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/94ad74/32.png) [@valerieloy](https://www.ruby-forum.com/u/valerieloy)\
**Post date:** [December 12, 2007, 10:04am UTC](https://www.ruby-forum.com/t/generating-pdf-environment-rb-problem/196538/1 "2007-12-12T10:04:01Z")

</div>

Hi,

I would like to implement a PDF function into my application.  
I have already installed the pdf-writer-1.1.6.

Firstly, there are several folders in this zip folder e.g. pdf, writer  
etc.  
Where exactly should I paste this folders to?

Secondly, I added the following codes to the environment.rb:  
require ‘pdf/writer’  
Mime:Type.register ‘application/pdf’,:pdf

Where should I place these codes and the should the word “application”  
be replaced with my project’s name?  
I am sure that there is something wrong with the codes in here as when i  
restarted WEBRICK in my command prompt, some of the errors that occurred  
are:

- already initialized constant OPTIONS  
-no such file to load – transaction/simple

Can someone please give me a solution? Because there is no way I can  
implement the codes if I cannot start my WEBrick successfully.  
This is quite urgent as the deadline is drawing nearer. Please help!  
Thank you very much!!!
