Ruby-ldap on Windows

Forgive me if this has already been answered (I can't find the answer
anywhere).

How would one go about getting ruby-ldap to run on Windows? Is there a
binary? I compile stuff all the time on Linux, but the thought of
compiling something on Windows makes me shudder (where to start?).

Any kind help would be greatly appreciated. Introducing Ruby at my work
depends on this question being answered. Thanks.

Tim Morgan wrote:

Forgive me if this has already been answered (I can't find the answer
anywhere).

How would one go about getting ruby-ldap to run on Windows? Is there a
binary? I compile stuff all the time on Linux, but the thought of
compiling something on Windows makes me shudder (where to start?).

You can get a free Win32 C compiler from MSDN [0], or use Cygwin[1] to get a Unix emulation layer.

Any kind help would be greatly appreciated. Introducing Ruby at my work
depends on this question being answered. Thanks.

James

[0] http://msdn.microsoft.com/visualc/vctoolkit2003/
[1] http://cygwin.com/

Tim Morgan wrote:

How would one go about getting ruby-ldap to run on Windows? Is there a
binary? I compile stuff all the time on Linux, but the thought of
compiling something on Windows makes me shudder (where to start?).

Which Windows distribution of Ruby? My Cygwin box has ruby-ldap 0.8.2
installed. It's been a long time since I did it, but I don't recall
encountering any issues. It found the Cygwin openldap and linked right
up to it. Do you have a particular LDAP client library?

I have just this week gone through the ordeal of downloading the free MS
development tools and building an extension for the One-Click Installer
version of Ruby. It's ugly, but it works. I still need to write it up.
Email me off-list if you want the quick and dirty details.

Steve

Tim Morgan wrote:

Forgive me if this has already been answered (I can't find the answer
anywhere).

How would one go about getting ruby-ldap to run on Windows? Is there

a

binary? I compile stuff all the time on Linux, but the thought of
compiling something on Windows makes me shudder (where to start?).

Any kind help would be greatly appreciated. Introducing Ruby at my

work

depends on this question being answered. Thanks.

I thought the ADSI/LDAP stuff might be of interest to you:

Regards,

Dan

Thanks for the help guys. I will try your tips and see how far I get.

Hi James,

I know nothing about Ruby-Ldap but if you are looking for a good C compiler (not C++) on Windows, give a try to "PellesC".

(http://www.smorgasbordet.com/pellesc/\)

It's great and free.

Regards,

eduardo.

James Britt wrote:

ยทยทยท

Tim Morgan wrote:

Forgive me if this has already been answered (I can't find the answer
anywhere).

How would one go about getting ruby-ldap to run on Windows? Is there a
binary? I compile stuff all the time on Linux, but the thought of
compiling something on Windows makes me shudder (where to start?).

You can get a free Win32 C compiler from MSDN [0], or use Cygwin[1] to get a Unix emulation layer.

Any kind help would be greatly appreciated. Introducing Ruby at my work
depends on this question being answered. Thanks.

James

[0] http://msdn.microsoft.com/visualc/vctoolkit2003/
[1] http://cygwin.com/

OK, I guess someone is gonna have to spell it out for me, because I'm
having no luck at all. So, I got cygwin installed. Then I tried to
install OpenLDAP, but had no luck (something about no suitable cc or
gcc found - do I need to install a compiler separate?). So then I
installed the OpenLDAP for Windows binary which didn't seem to help
any, because ruby-ldap still cannot find ldap.h or lber.h, even if I
specify the directory to look in. So I then tried to download and tried
the 0.8 cygwin version of ruby-ldap, which complained about the same
stuff.

I'm no doubt missing something obvious, but why the heck does this have
to be so hard on Windows? Never mind. Don't answer that.

Tim Morgan wrote:

OK, I guess someone is gonna have to spell it out for me, because I'm
having no luck at all. So, I got cygwin installed. Then I tried to
install OpenLDAP, but had no luck (something about no suitable cc or
gcc found - do I need to install a compiler separate?). So then I
installed the OpenLDAP for Windows binary which didn't seem to help
any, because ruby-ldap still cannot find ldap.h or lber.h, even if I
specify the directory to look in. So I then tried to download and tried
the 0.8 cygwin version of ruby-ldap, which complained about the same
stuff.

Are you using the Cygwin installer (setup.exe)? If so, look under category Libs. You should find there (and install if you haven't) openssl and openssl-devel. openssl-devel is where the headers and libraries are found. I'm running 2.2.17-1 of both and Ruby 1.8.1.

You will need gcc to build the extension. (I always tell Cygwin to install everything. Disk space is cheap and you avoid these chains of dependency.)

With those installed, the installation steps in the README go smoothly for me.

I have to travel this afternoon and probably won't make it back to ruby-talk until Thursday. Good luck.

Steve