Forum: Ruby Ruby LDAP SSL thingy won't go.

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.
8e44b211865cd5915f2f883fd960b56d?d=identicon&s=25 Xeno Campanoli (Guest)
on 2009-05-29 23:13
(Received via mailing list)

require 'ldap'

         ldap_host = ''
         ldap_port = 636
         ldap_conn =,ldap_port)
         puts "trace 2 ldap_conn:  #{ldap_conn.class}"
         ldap_conn.set_option( LDAP::LDAP_OPT_PROTOCOL_VERSION, 3 )
         puts "trace 3 ldap_conn:  #{ldap_conn.class}"
         bind_dn =
         password_dn = "#{ARGV[1]}"
         puts "trace 4 ldap_conn:  #{ldap_conn.class}"
         puts "trace 5 oops, #{$!}"

# end of test

I have a coworker who got this to work on his server, but on my Ubuntu
it won't go.  We seem to have the configurations all correct.  Is there
special configuration aspect or activity needed on Ubuntu servers for
like this?  Changing the port to 389 and the SSLConn to Conn makes it go
too, if that is any kind of a hint.  Here is what the failures look
$ ./t7.rb un 'pw'
trace 2 ldap_conn:  LDAP::SSLConn
trace 3 ldap_conn:  LDAP::SSLConn
trace 5 oops, Can't contact LDAP server
$ ./t4.rb un 'pw'
trace 2 ldap_conn:  LDAP::Conn
trace 3 ldap_conn:  LDAP::Conn
trace 4 ldap_conn:  LDAP::Conn
where t4 is with just Conn/389 and t7 is with SSLConn and 636 as in my
above.  Again, a coworker go the t7.rb running just like the t4 on his
but mine don't take.  We cannot find the config problem and the
directories seem to coincide for things that seem important.
8e44b211865cd5915f2f883fd960b56d?d=identicon&s=25 Xeno Campanoli (Guest)
on 2009-05-30 01:50
(Received via mailing list)
Xeno Campanoli wrote:

I just filed this bug in regard to my question:

I am very anxious to get this figured out, otherwise we may be forced to
CentOS for this service rather than Ubuntu Server.
753dcb78b3a3651127665da4bed3c782?d=identicon&s=25 Brian Candler (candlerb)
on 2009-05-30 09:55
You asked the same question once before at

I gave you some suggestions to try to narrow down the problem. You
either ignored them, or didn't bother to post the results which would
have helped identify the problem.

However you didn't say before that you were running Ubuntu. If you are
using the stock Ubuntu ruby package, did you remember to install the
libopenssl-ruby package? (Ubuntu breaks out this part of Ruby into a
separate package)
8e44b211865cd5915f2f883fd960b56d?d=identicon&s=25 Xeno Campanoli (Guest)
on 2009-06-01 06:26
(Received via mailing list)
Brian Candler wrote:
> separate package)
Thank you Brian.  I am at home now.  I will try this first thing
morning.  I'm sorry I didn't see it before.  Perhaps that's all it is.
This topic is locked and can not be replied to.