warning: already initialized constant PDF

chandrashekar picture chandrashekar · Jun 8, 2012 · Viewed 9k times · Source

Right now I am working on rails 3.0.0. If I run my project in terminal, I get this warning. Please help me.

/usr/share/ruby-rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.0.0/lib/action_dispatch/http/mime_type.rb:98: warning: already initialized constant PDF

Answer

23inhouse picture 23inhouse · Aug 20, 2012

You might have this in your config/initializers/mime_types.rb file.

Mime::Type.register 'application/pdf', :pdf

It looks like newer versions of rails already registers it.