Mime::Types where?

I tried to use the Mime::Types in Ruby for my file upload. I added
require ‘mime/types’ but it says “no such file to load”. Is it a gem or
what? Something I should install?

Peter De Berdt wrote:

On 22 Aug 2008, at 10:10, Pål Bergström wrote:

Yes, or if you use Rails 2.1, you can add this to the gem section of
your environment.rb:

config.gem “mime-types”, :lib => “mime/types”, :version => ‘>= 1’

and then run

rake gems:install

Best regards

Peter De Berdt

Thanks. That explains it. :slight_smile:

On 22 Aug 2008, at 10:10, Pål Bergström wrote:

I tried to use the Mime::Types in Ruby for my file upload. I added
require ‘mime/types’ but it says “no such file to load”. Is it a gem
or
what? Something I should install?

Yes, or if you use Rails 2.1, you can add this to the gem section of
your environment.rb:

config.gem “mime-types”, :lib => “mime/types”, :version => ‘>= 1’

and then run

rake gems:install

Best regards

Peter De Berdt