Ruby-net-ldap

Hello

I have the following code to test authentication using ldap (i use
ruby-net-ldap extension) :

require ‘rubygems’
require ‘net/ldap’

def test
user = ‘bla’
pass = ‘bla’
ldap = Net::LDAP.new :host => “10.20.0.128”, :port => 389, :auth =>
{:method => :simple, :username => user, :password => pass}
p (ldap.bind) ? “Authorization Succeeded!” : “Authorization Failed:
#{ldap.get_operation_result.message}”
end

10.20.0.128 is my IP.

However I always get this error (which is originated by the ldap.bind
instruction) : “no connection to server”

Can anyone help me?

Thanks

regards