Problem registering Mime type

Solved the problem!

This is weird though, I had to put "Mime::Type.register
"application/pdf", :pdf"
after the initializer code.

The following thing worked for me, environment.rb:

RAILS_GEM_VERSION = '2.1.0' unless defined? RAILS_GEM_VERSION

require File.join(File.dirname(__FILE__), 'boot')

require 'rubygems'
require 'google_chart'
require 'prawn' do |config|

require 'will_paginate'
Mime::Type.register "application/pdf", :pdf

#Dealing with numbers
require 'bigdecimal'
require 'bigdecimal/math'

Explanation? anybody?

Aslam Syed wrote:

Asylam, I have been facing the same problem and came across your post
and solution. Thank you for posting your solution.

I was suprised that the Ruby runtime even executes code outside of the
Initialize method on the environment.rb. I thought that was the only
event handler it invoked within environment.rb. How did you know to
do this? I would appreciate any insight you may have that would make
sense out of this.