Im running the latest ActiveLDAP 0.8. My problem is the following Ok, its simple. This works: xxxcatalog# ldapsearch -x -h 192.168.1.40 -W -D ''cn=Manager,dc=webgate,dc=net,dc=au'' -b ''dc=webgate,dc=net,dc=au'' ''(dc=www)'' Enter LDAP Password: # extended LDIF # # LDAPv3 # base <dc=webgate,dc=net,dc=au> with scope subtree # filter: (dc=www) # requesting: ALL # # www, lemra, com, domains, webgate.net.au dn: dc=www,dc=lemra,dc=com,ou=domains,dc=webgate,dc=net,dc=au dc: www objectClass: top objectClass: dcObject objectClass: dNSDomain aRecord: 192.168.1.1 # search result search: 2 result: 0 Success # numResponses: 2 # numEntries: 1 Ive got a ruby script to test ActiveLDAP to establish connection with the server: require ''rubygems'' require ''active_ldap'' ActiveLDAP::Base.connect( :host => ''192.168.1.40'', :port => 389, :base => ''dc=webgate,dc=net,dc=au'', :bind_format => ''cn=Manager,dc=webgate,dc=net,dc=au'', :password_block => Proc.new { ''xxxx'' }, :allow_anonymous => false, :try_sasl => false ) but i get this: xxxcatalog# ruby ldaptest.rb /usr/pkg/lib/ruby/gems/1.8/gems/ruby-activeldap-0.8.0/lib/active_ldap.rb:947: warning: already initialized constant VERSION /usr/pkg/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:100:in `const_missing'': uninitialized constant ActiveLDAP (NameError) from /usr/pkg/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in `const_missing'' from ldaptest.rb:4 Has anyone got any clues please? Petr -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
James Newport
2008-Oct-16 04:33 UTC
Re: ActiveLDAP why are you so cruel to me? Help Please
Try replacing "ActiveLDAP::Base.connect" with "ActiveLdap::Base.establish_connection" James. petr wrote:> Ive got a ruby script to test ActiveLDAP to establish connection with > the server: > > require ''rubygems'' > require ''active_ldap'' > > ActiveLDAP::Base.connect( > :host => ''192.168.1.40'', > :port => 389, > :base => ''dc=webgate,dc=net,dc=au'', > :bind_format => ''cn=Manager,dc=webgate,dc=net,dc=au'', > :password_block => Proc.new { ''xxxx'' }, > :allow_anonymous => false, > :try_sasl => false > ) > > Petr-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---