Below specified code runs fine in ruby(console) irb but when i put this same code in my controller show “no connection to server”. Can somebody guide what is wrong with it.. Thanks.
require "rubygems"
require "net/ldap"
ldap = Net::LDAP.new
ldap.host = "host details"
ldap.port = 389
ldap.auth "company_name\\login","password"
ldap.bind
1 Answer