Generating PDF- environment.rb problem


1. Where exactly should I paste this folders to?
I would place them into the vendor directory or you can install the
library directly with gems so you don't have to put the library into
your projects folder.

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

You should place "require 'pdf/writer'" into the main application
controller (application.rb) or only in those controllers, wich realy
need the library.
And "Mime:Type.register 'application/pdf',:pdf" is misspelled. The
correct syntax is Mime::Type.register 'application/pdf',:pdf and
should be placed in config/initializers/mime_types.rb (there are also
some examples in this file).

Valerie Loy wrote: