Help - Webrick can't see external ldap library?


I’ve compiled and installed ruby/ldap on my unix box.

If I open an IRB session, I can successfully bind to an ldap server. As
a matter of fact, I have a unit test AND a functional test in my rails
application which both work. IE, I have successfully tested both my
authentication model and my authentication controller using

However, if I try run this same controller in a rails application
running under Webrick, the attempt to initialize an ldap connection
returns “can’t initialise an LDAP session”.

This error message comes back to me from the c extension code that’s
used to bridge from ruby to OpenLDAP. In this ruby extension code, the
ruby code attempts to call out to the ldap_init function in the
OpenLDAP shared library.

cldap = ldap_init (chost, cport);
if (!cldap)
rb_raise (rb_eLDAP_ResultError, “can’t initialise an LDAP

/The fact that I get this error message means that I’m getting as far as
the ruby/ldap extension; this error makes it seem like the ruby
extension cannot find the OpenLDAP shared library.

Can anyone give me a clue about what’s going on, or some hint about how
to debug this?

Ruby 1.8.3
Rails 1.0
Solaris 2.8
ruby/ldap 0.9.2

Thanks in advance,

Sandi Metz