Re: Net::LDAP 0.0.4 released

I noticed you had given your original code sample without
parens around the filter. Out of curiosity, what kind of LDAP
server are you connecting to?

I’m afraid I can’t say much more than it’s a 3rd party solution.

if rs
puts “DN: #{rs.first.dn}”
end

Of course, thanks. I should have known that.

By the way, you don’t have to instantiate a Net::LDAP object
every time you need to hit the server. Just instantiate it
once and keep it around in a singleton or global.

Yep, thanks.

I’ll be putting this into my Rails app this week to replace the ugly
system call + open3 solution I’m using now (ick).

Many thanks for this!

Dan

PS - The ruby-ldap (C extension) library causes Ruby to segfault in
combination with WEBrick, in case you’re wondering why I didn’t use that
instead.

This communication is the property of Qwest and may contain confidential
or
privileged information. Unauthorized use of this communication is
strictly
prohibited and may be unlawful. If you have received this communication
in error, please immediately notify the sender by reply e-mail and
destroy
all copies of the communication and any attachments.

On 8/15/06, Berger, Daniel [email protected] wrote:

PS - The ruby-ldap (C extension) library causes Ruby to segfault in
combination with WEBrick, in case you’re wondering why I didn’t use that
instead.

I’ve talked to several people who have pointed out that the native LDAP
library has a variety of problems, including working (well, not
working)
with Ruby threads, because of the way it does IO internally. Can’t
explain
the problem with Webrick but if we do our job right, there will be no
reason
to use native LDAP in preference to pure Ruby.

Apropos, does anyone out there have any reasons why they must use native
LDAP as opposed to Net::LDAP? Missing features? Bugs?

On 8/18/06, Luke K. [email protected] wrote:

I’m also excited that you’re flexible about the interface; the native
LDAP library was a bit too close to the actual LDAP library
interfaces, which are not exactly easy to use.

Thanks- improving the API and making it more Ruby-esque was a major
motivation for building this library, and I’m still looking for ways
to improve it, so anyone with a suggestion please let me know. The
native LDAP API, as clunky as it is, is an RFC standard, so a lot of
people hesitate to change it. But it’s so weird and old-fashioned that
I decided to do so anyway.

On Aug 15, 2006, at 4:10 PM, Francis C. wrote:

to use native LDAP in preference to pure Ruby.

Apropos, does anyone out there have any reasons why they must use
native
LDAP as opposed to Net::LDAP? Missing features? Bugs?

I don’t do as much with LDAP these days (although I did a bunch of
Rails LDAP work in February), but I’m really excited that you’re
building this native Ruby library. I went through the same
transition in perl from perl-wrapped compiled libraries to pure-perl
libraries, and it made a huge difference in the reliability and
simplicity of the libraries.

I’m also excited that you’re flexible about the interface; the native
LDAP library was a bit too close to the actual LDAP library
interfaces, which are not exactly easy to use.

So, thanks. I look forward to using this for my next LDAP project.
I’ll definitely be providing feedback when I have occasion to use.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs