activeldap/activeldap — Issue #30: ldap.yml not loaded automatically with rails 3.1.3 + Jruby 1.6.5.1
Author: tcpipmen
Created: 2012-01-14 00:33:18+00:00
State: open

Hi, I Have a ldap.yml below and class Person(ActiveLdap::Base). If I call straight Person.exists?(username) then it complains that cannot connect to LDAP server. But If explicitly do the following setup_connection in code then it works. Please let know what is the correct procedure to load properly from ldap.yml file, as I do not want to setup_connection in the code. Thanks

ActiveLdap::Base.setup_connection :host => 192.168.1.140,
:port => 1389,
:base => dc=test,dc=org,
:bind_dn => cn=Directory Manager,
:password => 123,
:allow_anonymous => false

development:

host: 192.168.1.140
port: 1389
base: dc=test,dc=org
bind_dn: cn=Directory Manager
password: 123
allow_anonymous: false

test:
host: 192.168.1.140
port: 1389
base: dc=test,dc=org
bind_dn: cn=Directory Manager
password: 123
allow_anonymous: false

production:
host: 192.168.1.140
port: 1389
base: dc=test,dc=org
bind_dn: cn=Directory Manager
password: 123
allow_anonymous: false