# Ruby-ldap on Windows (built)

**URL:** <https://www.ruby-forum.com/t/ruby-ldap-on-windows-built/58123>\
**Category:** Ruby\
**Created:** [April 18, 2006, 6:28pm UTC](https://www.ruby-forum.com/t/ruby-ldap-on-windows-built/58123 "2006-04-18T18:28:09Z")\
**Posts on this page:** 17\
**Page:** 2

<div class="post-metadata">

**Author:** ![yetanothergeek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8e8cbc/32.png) [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Post date:** [August 29, 2006, 5:16pm UTC](https://www.ruby-forum.com/t/ruby-ldap-on-windows-built/58123/21 "2006-08-29T17:16:58Z")

</div>

Francis C. wrote:

> Rcmn 73 wrote:
> 
> > Francis C. wrote:
> > 
> > > On 8/28/06, Rcmn 73 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> > > 
> > > > That would be great if ActiveLdap get accessible without compiling.  
> > > > Because i almost choose to do this project with python.I was done with  
> > > > my test in less than 3 hours installation included. I was ready to go  
> > > > with it but i found active\_directory ,a python module, easy to use but  
> > > > also very limitated.
> > > 
> > > Out of curiosity, what were the specific limitations you found with  
> > > the python module active\_directory? I want to make sure I didn’t leave  
> > > similar limitations in Net::LDAP :-).
> > 
> > this module allow to just search.No add/remove function .And i run into  
> > a limitation, 1500 max returns(That’s just what i’ve been experiencing).
> 
> Thanks for the information. Net::LDAP has the full set of LDAP  
> operations. I’m a little surprised that you are able to get 1500 entries  
> per search, though. The usual limitation with ActiveDirectory is 1000.  
> Many tools have this limitation, which is caused by a lack of support  
> for RFC-2696. Net::LDAP doesn’t have this limitation, and neither do the  
> more recent versions of ldapsearch.
> 
> I’ve never heard of 1500, though, unless your A/D configuration has been  
> tweaked.

This is a very good new that Net::LDAP does not have this limitation.  
As our Active directory limitation it has probably limitated to  
1500.Using PHP or the DS command’s i can get various result but i was  
never able to get more than 1500+.And depending of the periode of the  
day PHP or DS cmd would just died without any return.Anyway with the  
python module i get a consitent 1500.So maybe as u mention the  
limitation is an AD setting.  
So i assume i will run into that limitation also with Net::LDAP…Or  
Net::LDAP process search by a different way and avoid this sort of  
limitation ? By getting a set of 100 then an other 100 etc ? Or is that  
impossible?

---

<div class="post-metadata">

**Author:** ![yetanothergeek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8e8cbc/32.png) [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Post date:** [August 29, 2006, 5:45pm UTC](https://www.ruby-forum.com/t/ruby-ldap-on-windows-built/58123/22 "2006-08-29T17:45:41Z")

</div>

On 8/29/06, Rcmn 73 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> This is a very good new that Net::LDAP does not have this limitation.

Net::LDAP correctly implements the “paged-search” control, so there is  
no limit on the number of entries you can query from A/D. If your set  
is particularly large (more than 10,000 for example), then I recommend  
you use the :return\_result =\> false flag. See the rdocs for  
Net::LDAP#search for more information.

---

<div class="post-metadata">

**Author:** ![yetanothergeek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8e8cbc/32.png) [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Post date:** [August 29, 2006, 3:57pm UTC](https://www.ruby-forum.com/t/ruby-ldap-on-windows-built/58123/23 "2006-08-29T15:57:30Z")

</div>

Rcmn 73 wrote:

> Francis C. wrote:
> 
> > On 8/28/06, Rcmn 73 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> > 
> > > That would be great if ActiveLdap get accessible without compiling.  
> > > Because i almost choose to do this project with python.I was done with  
> > > my test in less than 3 hours installation included. I was ready to go  
> > > with it but i found active\_directory ,a python module, easy to use but  
> > > also very limitated.
> > 
> > Out of curiosity, what were the specific limitations you found with  
> > the python module active\_directory? I want to make sure I didn’t leave  
> > similar limitations in Net::LDAP :-).
> 
> this module allow to just search.No add/remove function .And i run into  
> a limitation, 1500 max returns(That’s just what i’ve been experiencing).

Thanks for the information. Net::LDAP has the full set of LDAP  
operations. I’m a little surprised that you are able to get 1500 entries  
per search, though. The usual limitation with ActiveDirectory is 1000.  
Many tools have this limitation, which is caused by a lack of support  
for RFC-2696. Net::LDAP doesn’t have this limitation, and neither do the  
more recent versions of ldapsearch.

I’ve never heard of 1500, though, unless your A/D configuration has been  
tweaked.

---

<div class="post-metadata">

**Author:** ![yetanothergeek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8e8cbc/32.png) [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Post date:** [August 29, 2006, 5:47pm UTC](https://www.ruby-forum.com/t/ruby-ldap-on-windows-built/58123/24 "2006-08-29T17:47:43Z")

</div>

On 8/29/06, Rcmn 73 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> This is a very good new that Net::LDAP does not have this limitation.  
> As our Active directory limitation it has probably limitated to  
> 1500.Using PHP or the DS command’s i can get various result but i was  
> never able to get more than 1500+.And depending of the periode of the  
> day PHP or DS cmd would just died without any return.Anyway with the  
> python module i get a consitent 1500.So maybe as u mention the  
> limitation is an AD setting.  
> So i assume i will run into that limitation also with Net::LDAP…Or  
> Net::LDAP process search by a different way and avoid this sort of  
> limitation ? By getting a set of 100 then an other 100 etc ? Or is that  
> impossible?

I forgot to mention: paged searches are automatic in Net::LDAP. You  
don’t have to write your code differently to get them.

---

<div class="post-metadata">

**Author:** ![yetanothergeek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8e8cbc/32.png) [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Post date:** [August 29, 2006, 6:11pm UTC](https://www.ruby-forum.com/t/ruby-ldap-on-windows-built/58123/25 "2006-08-29T18:11:46Z")

</div>

Does Net::LDAP have a way of dealing with this on v2 servers? or  
servers that don’t yet implement paged results? Thanks.

-jason

---

<div class="post-metadata">

**Author:** ![yetanothergeek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8e8cbc/32.png) [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Post date:** [August 29, 2006, 6:26pm UTC](https://www.ruby-forum.com/t/ruby-ldap-on-windows-built/58123/26 "2006-08-29T18:26:59Z")

</div>

Francis C. wrote:

> On 8/29/06, Rcmn 73 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > This is a very good new that Net::LDAP does not have this limitation.  
> > As our Active directory limitation it has probably limitated to  
> > 1500.Using PHP or the DS command’s i can get various result but i was  
> > never able to get more than 1500+.And depending of the periode of the  
> > day PHP or DS cmd would just died without any return.Anyway with the  
> > python module i get a consitent 1500.So maybe as u mention the  
> > limitation is an AD setting.  
> > So i assume i will run into that limitation also with Net::LDAP…Or  
> > Net::LDAP process search by a different way and avoid this sort of  
> > limitation ? By getting a set of 100 then an other 100 etc ? Or is that  
> > impossible?
> 
> I forgot to mention: paged searches are automatic in Net::LDAP. You  
> don’t have to write your code differently to get them.

This is great informations and specially great news.Thank you very much  
for the information and the great work.

---

<div class="post-metadata">

**Author:** ![yetanothergeek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8e8cbc/32.png) [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Post date:** [August 29, 2006, 6:23pm UTC](https://www.ruby-forum.com/t/ruby-ldap-on-windows-built/58123/27 "2006-08-29T18:23:48Z")

</div>

On 8/29/06, Jason R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Does Net::LDAP have a way of dealing with this on v2 servers? or  
> servers that don’t yet implement paged results? Thanks.
> 
> -jason

That’s two different questions. Net::LDAP only implements V3. Do you  
actually have a V2 server??? If so, I’d be really appreciative if you  
could try Net::LDAP against it and see what happens. (Is it one of  
those early Netscape Enterprise Directories?)

Paged results: Net::LDAP specifies the control as “noncritical,” which  
means it will be ignored by servers that don’t recognize it (such as  
OpenLDAP versions other than very recent ones). So it will  
interoperate seamlessly with these servers.

---

<div class="post-metadata">

**Author:** ![yetanothergeek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8e8cbc/32.png) [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Post date:** [August 29, 2006, 6:35pm UTC](https://www.ruby-forum.com/t/ruby-ldap-on-windows-built/58123/28 "2006-08-29T18:35:51Z")

</div>

On 8/29/06, Rcmn 73 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> This is great informations and specially great news.Thank you very  
> much  
> for the information and the great work.

If you try the library and have problems, please tell me, either here  
or by private email. A lot of people have done so already, and it  
makes the library better for everyone.

---

<div class="post-metadata">

**Author:** ![yetanothergeek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8e8cbc/32.png) [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Post date:** [August 29, 2006, 6:31pm UTC](https://www.ruby-forum.com/t/ruby-ldap-on-windows-built/58123/29 "2006-08-29T18:31:50Z")

</div>

I don’t have a V2 server; I was more concerned with the versions of  
OpenLDAP that don’t recognize it… Is there a way to deal with  
getting all the results from a not recent OpenLDAP server? Thanks.

-jason

---

<div class="post-metadata">

**Author:** ![yetanothergeek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8e8cbc/32.png) [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Post date:** [August 29, 2006, 7:56pm UTC](https://www.ruby-forum.com/t/ruby-ldap-on-windows-built/58123/30 "2006-08-29T19:56:05Z")

</div>

Excellent… I’ll have to start retrofitting some of my ruby/ldap  
based scripts over, and playin’ around.

-jason

---

<div class="post-metadata">

**Author:** ![yetanothergeek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8e8cbc/32.png) [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Post date:** [August 29, 2006, 7:15pm UTC](https://www.ruby-forum.com/t/ruby-ldap-on-windows-built/58123/31 "2006-08-29T19:15:59Z")

</div>

On 8/29/06, Jason R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I don’t have a V2 server; I was more concerned with the versions of  
> OpenLDAP that don’t recognize it… Is there a way to deal with  
> getting all the results from a not recent OpenLDAP server? Thanks.

Net::LDAP works seamlessly with older OpenLDAP servers that don’t  
support paged queries. I know because I use one in production all day  
long.

For what it’s worth (and at the risk of igniting some flames): I’m  
quite convinced that paged-searches were invented by Microsoft  
primarily to lighten the load on their somewhat, ummm… “challenging”  
LDAP implementation. (Bear in mind that LDAP support was tacked onto  
A/D after the core was designed.) If you read the paged-search RFC,  
they blow some smoke about lessening the load on _client_  
implementations.

OpenLDAP added paged searches recently, but their older  
implementations don’t suffer particularly for the lack. I routinely  
query 100,000 entries out of an old OpenLDAP on a low-end workstation  
to test Net::LDAP, and it doesn’t break a sweat. It’s not fast, but  
it’s stable.

---

<div class="post-metadata">

**Author:** ![yetanothergeek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8e8cbc/32.png) [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Post date:** [March 13, 2008, 3:13pm UTC](https://www.ruby-forum.com/t/ruby-ldap-on-windows-built/58123/32 "2008-03-13T15:13:20Z")

</div>

> I’m getting the following error when i try to install ruby-ldap-0.9.7 in  
> Windows Vista.
> 
> extconf.rb:162:in ``’: No such file or directory - lib  
> /def:./win/wldap32.def /o  
> ut:./win/wldap32.lib (Errno::ENOENT)  
> from extconf.rb:162
> 
> Someone can help me?

But who use Windows Vista ???  
sorry --\> []

---

<div class="post-metadata">

**Author:** ![yetanothergeek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8e8cbc/32.png) [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Post date:** [March 13, 2008, 3:26pm UTC](https://www.ruby-forum.com/t/ruby-ldap-on-windows-built/58123/33 "2008-03-13T15:26:51Z")

</div>

It say’s that file you want open or do something else don’t exist. Maybe  
you  
just do some mistake in path to this file or you don’t have permissions  
to  
access.

2008/3/13, Rcmn 73 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![yetanothergeek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8e8cbc/32.png) [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Post date:** [March 13, 2008, 1:57pm UTC](https://www.ruby-forum.com/t/ruby-ldap-on-windows-built/58123/34 "2008-03-13T13:57:16Z")

</div>

Chris S. wrote:

> Wilson B. wrote:
> 
> > On 4/18/06, Chris S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> > 
> > > on the mswin32 build, please try the pre-built package:  
> > > I believe these are the proper locations. Hopefully this helps someone  
> > > out there 🙂
> > > 
> > > Note: This was build using 0.9.4 of ruby-ldap on WinXP SP2.
> > 
> > I would LOVE to know how you managed this. I struck out hard on  
> > several occasions, and I’d like to learn from my mistakes.
> > 
> > –Wilson.
> 
> Well, the first step was to download the latest Platform SDK  
> ([http://www.microsoft.com/downloads/details.aspx?FamilyID=0baf2b35-c656-4969-ace8-e4c0c0716adb&DisplayLang=en](http://www.microsoft.com/downloads/details.aspx?FamilyID=0baf2b35-c656-4969-ace8-e4c0c0716adb&DisplayLang=en)).  
> The reason is that I have MSVC C++ 6.0, and apparently that distribution  
> has a known issue with the wldap32.lib library. After downloading the  
> SDK, I grabbed the latest ruby-ldap source from sourceforge.
> 
> Now, the ruby-ldap source has a win directory, which has a wldap32.def  
> file, and this is used to build the wldap32.lib file. However, I think  
> this .def creates the BAD .lib that comes with MSVC 6, so what I did was  
> drop in the one from the platform SDK.
> 
> Now, the tricky part: modifiying the source. I had to open the  
> sslconn.c file, and change a few things. The first is that the  
> rb\_ldap\_sslconn\_bind\_f function (around line 260) is missing an  
> argument. The function definition should be:
> 
> VALUE rb\_ldap\_sslconn\_bind\_f(int argc, VALUE argv[], VALUE self,  
> VALUE (\*rb\_ldap\_sslconn\_bind\_func) (int, VALUE, VALUE))
> 
> The two functions that follow (rb\_ldap\_sslconn\_bind\_s and  
> rb\_ldap\_sslconn\_simple\_bind\_s) make calls to a function called
> 
> rb\_ldap\_sslconn\_bind\_func
> 
> However, it should be
> 
> rb\_ldap\_sslconn\_bind\_f
> 
> Next - the SDK includes special command prompt shortcuts that set up the  
> paths and all that, so I used the one for my machine (Win XP 32-bit),  
> and went to the directory where I had extracted the source.
> 
> Then:
> 
> ruby extconf.rb --with-wldap32  
> nmake  
> nmake install
> 
> I believe the Platform SDK itself should be sufficient to build  
> everything - the real trick is getting that .lib from the SDK and  
> dropping it in the \win directory of the extracted source, and then  
> changing the source code.

I’m getting the following error when i try to install ruby-ldap-0.9.7 in  
Windows Vista.

extconf.rb:162:in ``': No such file or directory - lib  
/def:./win/wldap32.def /o  
ut:./win/wldap32.lib (Errno::ENOENT)  
from extconf.rb:162

Someone can help me?

---

<div class="post-metadata">

**Author:** ![yetanothergeek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8e8cbc/32.png) [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Post date:** [August 8, 2008, 7:28pm UTC](https://www.ruby-forum.com/t/ruby-ldap-on-windows-built/58123/35 "2008-08-08T19:28:24Z")

</div>

Hi…

Someone has build ruby-ldap with openldap2 (–with-openldap2) for  
windows xp?

I’m using openldap and the pre-built package, i have problem when  
updating attributes from my rails app.

No such attribute…

I build openldap, ruby-ldap with openldap2, and installed activeldap and  
works full gut!..

Someone can help?

thankx

---

<div class="post-metadata">

**Author:** ![yetanothergeek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8e8cbc/32.png) [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Post date:** [August 20, 2009, 10:54am UTC](https://www.ruby-forum.com/t/ruby-ldap-on-windows-built/58123/36 "2009-08-20T10:54:04Z")

</div>

Chris S. wrote:

> I have finally managed to build the ruby-ldap library for the Windows  
> platform (i.e. not a cygwin or ming build, but an mswin32 build).
> 
> This has been an issue for awhile as the maintainer of the project does  
> not have access to a Windows machine for testing.
> 
> So far, it seems to be working (I use it only for ActiveDirectory  
> authentication).
> 
> Anyway, if you are like me and have been struggling to get ldap working  
> on the mswin32 build, please try the pre-built package:
> 
> Download:  
> [http://webtest.wvu.edu/users/cbscharf/ldap/](http://webtest.wvu.edu/users/cbscharf/ldap/)
> 
> Put ldap.so in:  
> C:\ruby\lib\ruby\site\_ruby\1.8\i386-msvcrt
> 
> Put \*.rb in:  
> C:\ruby\lib\ruby\site\_ruby\1.8\ldap
> 
> I believe these are the proper locations. Hopefully this helps someone  
> out there 🙂
> 
> Note: This was build using 0.9.4 of ruby-ldap on WinXP SP2.  
> hi,I feel excited to the mswin32 build,but the download url provided  
> can’t be accessed. can you help me?  
> my email address is removed\_email\_address@domain.invalid.  
> thank you in advance.

---

<div class="post-metadata">

**Author:** ![yetanothergeek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/8e8cbc/32.png) [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Post date:** [August 8, 2008, 7:31pm UTC](https://www.ruby-forum.com/t/ruby-ldap-on-windows-built/58123/37 "2008-08-08T19:31:18Z")

</div>

sorry!

when i say…: I build openldap, ruby-ldap with openldap2, and installed  
activeldap and works full gut!..

works full gut in Leopard… but on Windows?

[Previous page](https://www.ruby-forum.com/t/ruby-ldap-on-windows-built/58123.md?page=1)
