I was trying to install compass on one of my VMs the other day and I ran into this error:

[vagrant@unknown080027e8e390 public]$ sudo gem install compass
Building native extensions.  This could take a while...
ERROR:  Error installing compass:
        ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h


Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/ffi-1.9.6 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/ffi-1.9.6/ext/ffi_c/gem_make.out

The quickfix for this is to install the ruby development package:

sudo yum -y install ruby-devel

I'm not sure why CentOS doesn't install this with rubygems...