Forum: Ruby on Rails Help - Webrick can't see external ldap library?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Sandi Metz (Guest)
on 2005-12-19 20:18
(Received via mailing list)

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
This topic is locked and can not be replied to.