# LDAP bind error

**URL:** <https://www.ruby-forum.com/t/ldap-bind-error/116452>\
**Category:** Rails\
**Created:** [October 5, 2007, 5:59pm UTC](https://www.ruby-forum.com/t/ldap-bind-error/116452 "2007-10-05T17:59:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mokkai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c2a13f/32.png) [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Post date:** [October 5, 2007, 5:59pm UTC](https://www.ruby-forum.com/t/ldap-bind-error/116452/1 "2007-10-05T17:59:22Z")

</div>

i am new to rails …

## in java ldap server is connecting without problem

username=""  
password=""  
LDAPConnection ld = new LDAPConnection();  
ld.connect( “192.168.1.1”, 389);  
con=ld.authenticate (  
“uid=”+username+",ou=People,dc=srishtisoft,dc=com",password);

/// con—\>true

## but in rails

```
  ldap_con = Net::LDAP.new({:host => '192.168.1.1',
                            :port => 389,
                            :auth=>
                               {
                                :method=>:simple,
                                :username => username,
                                :password => password
                               }
                            })
 @con=ldap_con.bind

```

#@con —\>false (always )

what is wrong here  
any help please…
