Ruby‘s autoconf doesn’t alert you to the fact that your system doesn’t have everything it could use. It’ll blindly clear you even though, for example, nothing crypto-related will work. On a fresh CentOS 6.4 install (with EPEL) the following will give you everything you need to build like a champ:
yum install gcc make gcc-c++ openssl-devel libffi-devel \ ncurses-devel gdbm-devel readline-devel bison-devel bison
Are libyaml-devel and iconv-devel not needed?
They do not appear to be strictly necessary, no.