For anyone doing stuff requiring a good MIME library in Ruby, shared-mime-info works well. On OS X a few things are necessary to make it work though.
First, use ports to install the shared-mime-info database:
sudo port install shared-mime-info
Then you have to set XDG_DATA_DIRS to point at the right place on OS X, which is /opt/local/share. Put this in your .bashrc file:
export XDG_DATA_DIRS=:/opt/local/share
XDG_DATA_DIRS is where freedesktop.org stuff looks to find files, and if not specified will look in /usr/share or /usr/local/share. Since ports on OS X puts everything in /opt/local, you have to set it.
That's pretty much it! If you don't install the shared-mime-info database and set the ENV variable the gem will still work, just not as well (returning text/plain instead of text/css for css files, etc.)