Haven't used that particular gem (I use ActiveDirectory myself) but it looks
like just a namespace issue. You haven't included the namespace therefore
you would require the full object path e.g. ActiveLdap::Group.find(:all,
"*")

On Thu, Nov 12, 2009 at 5:39 AM, jackster the jackle <johnsheahan / att.net>wrote:

> I haven't done much with polling AD in the past but I am now trying to
> write a basic script using active_ldap that pulls a list of users from
> AD. The following code I have here doesn't work but the thing that
> bothers me the most is that when I use a sniffer on the AD server, I
> don't see any attempt by the script to communicate with the server.
>
> require 'rubygems'
> require 'active_ldap'
>
> ActiveLdap::Base.setup_connection(
>   :host => "10.1.1.1",
>   :user => "admin",
>   :password => "password",
>   :base => "dc=voice,dc=company,dc=com"
> )
> all_users = Group.find(:all, '*')
> puts all_users
>
>
> The actual error I get is:
>
>
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:443:in
> `load_missing_constant': uninitialized constant Group (NameError)
>
> Any ideas as to why this basic config isn't working?
>
> Thanks
>
> jack
> --
> Posted via http://www.ruby-forum.com/.
>
>