I had an old post on getting rmagick to compile on RHEL4, and consider this an update (if you still happen to use rmagick 1.x). I suspect you probably still need the urw-fonts package installed in RHEL5 but you’ll also want to add the
--disable-htmldoc flag.