I have figured out the problem. MY windows AD is listening on 389, not 
on 636.
ldapsearch command works only when I don't put  -p in the command line. 
sorry to bother you all

-- 
Posted via http://www.ruby-forum.com/.