Matt Todd wrote: > Pluck out the actual LDAP code into IRB and see if it works. I've not > had experience passing Net::LDAP.new a hash, I've only ever assigned > values to its attributes after creating the instance, like: > > ldap = Net::LDAP.net > ldap.host = 'http://localhost/ > ldap.auth "%s@localhost" % user, pass > ldap.bind > > Try that if your way fails in IRB. > > Matt Todd Hello Matt, Thanks for ur reply but i used ur code into irb but it's not showing any error instead of that it's showing false. i create function like that. require 'net/ldap' def ldap_connect ldap = Net::LDAP.new ldap.host = 'ldap://ldapservername.com' ldap.auth "%sldap://ldapservername.com"%'username','password' ldap.bind end result::::False Will you please suggest me that what is the error.Please Help me . Thanks Varun -- Posted via http://www.ruby-forum.com/.