# Re: Net::LDAP 0.0.4 released

**URL:** <https://www.ruby-forum.com/t/re-net-ldap-0-0-4-released/65070>\
**Category:** Ruby\
**Created:** [August 15, 2006, 11:03pm UTC](https://www.ruby-forum.com/t/re-net-ldap-0-0-4-released/65070 "2006-08-15T23:03:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![BergerS\_Daniel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc8723/32.png) [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Post date:** [August 15, 2006, 11:03pm UTC](https://www.ruby-forum.com/t/re-net-ldap-0-0-4-released/65070/1 "2006-08-15T23:03:52Z")

</div>

> > 
> 
> 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.

---

<div class="post-metadata">

**Author:** ![BergerS\_Daniel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc8723/32.png) [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Post date:** [August 15, 2006, 11:12pm UTC](https://www.ruby-forum.com/t/re-net-ldap-0-0-4-released/65070/2 "2006-08-15T23:12:52Z")

</div>

On 8/15/06, Berger, Daniel [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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?

---

<div class="post-metadata">

**Author:** ![BergerS\_Daniel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc8723/32.png) [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Post date:** [August 18, 2006, 7:30pm UTC](https://www.ruby-forum.com/t/re-net-ldap-0-0-4-released/65070/3 "2006-08-18T19:30:03Z")

</div>

On 8/18/06, Luke K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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.

---

<div class="post-metadata">

**Author:** ![BergerS\_Daniel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc8723/32.png) [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Post date:** [August 18, 2006, 7:21pm UTC](https://www.ruby-forum.com/t/re-net-ldap-0-0-4-released/65070/4 "2006-08-18T19:21:01Z")

</div>

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.
