# About mime/types

**URL:** <https://www.ruby-forum.com/t/about-mime-types/147067>\
**Category:** Ruby\
**Created:** [August 28, 2008, 9:08am UTC](https://www.ruby-forum.com/t/about-mime-types/147067 "2008-08-28T09:08:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulbutcher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Post date:** [August 28, 2008, 9:08am UTC](https://www.ruby-forum.com/t/about-mime-types/147067/1 "2008-08-28T09:08:12Z")

</div>

Why does this MIME::Types[‘text/plain’] give ‘text/plaintext/plain’?

The thing is I’m trying to understand how to use mime/types  
[http://mime-types.rubyforge.org/classes/MIME/Types.html](http://mime-types.rubyforge.org/classes/MIME/Types.html) and I can’t  
mimic this example:

plaintext = MIME::Types[‘text/plain’]  
print plaintext.media\_type # =\> ‘text’  
print plaintext.sub\_type # =\> ‘plain’

It doesn’t work unless I do MIME::Types[‘text/plain’].first. Why?
