I don't know whether anyone else is trying to do this, but I just wasted four hours of a perfectly good day getting this tiny piece to work right. To save you the time, here's what (finally) worked for me:

  1. Install MacPorts

  2. sudo port install file

  3. Download  ruby-filemagic-0.1.1.tar.gz

  4. Open a shell and unpack it somewhere reasonable.

  5. sudo - (This prompts for your password rather than the root password)

  6. cd to the ruby-filemagic-0.1.1 folder

  7. ARCHFLAGS="-arch i386" ruby extconf.rb --with-magic-dir=/opt/local

  8. make

  9. make install