Pdf is not a class or module


In our application we have used the pdf writer to give us PDF outputs.
And we have installed these gems and included them in the environment.rb

require ‘pdf/writer’
require ‘pdf/simpletable’

But when we try to generate the pdf, sometimes we get the pdf file as
result and at other times we get this error:
pdf is not a class or module.