When you are coding a C extension for Ruby, and you use mkmf to create your Ruby Makefile on a Solaris box, make install may fail.

Solution:
Add -lsocket -lnsl after -lingres.

That's it. Hat tip: Jared