Mime::Type.lookup_by_extension only finding "text/*" types #3109

fusepilot opened this Issue Sep 23, 2011 · 1 comment

2 participants


Clean install 3.1.0.

Inside any controller action:

#works, returns "text/html"

#does not work, returns "nil"

I'm led to believe that it is intended to work as I expected judging from this code found in mime_types.rb:

Mime::Type.register "image/jpeg", :jpeg, [], %w(jpg jpeg jpe)


Ruby on Rails member

The file you are looking at is the edge version. The 3.1 version doesn't have the image types registered.

You can register more mime types in config/initializers/mime_types.rb in your application.

@vijaydev vijaydev closed this Sep 23, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment