Notes: This has been tested with b110, which is very close to the final 2009.06 GA build.
Ruby/LDAP is flexible enough to build with the OpenLDAP integration in OpenSolaris 2009.06, as is the LDAP extension for Python. Here's the configure command:
/usr/ruby/1.8/bin/ruby extconf.rb \
--with-ldap-include=/usr/include/openldap \
--with-openldap2 \
--with-libldap_r=ldap_r-2.4 \
--with-libldap=ldap-2.4
After make and make install, it is ready to use.
(See also Net::LDAP, a pure Ruby LDAP client implementation.)