Mazwak / active_directory

Native Ruby Access to Microsoft Active Directory
http://rubyforge.org/projects/activedirectory
GNU General Public License v3.0
16 stars 18 forks source link

updating from 1.6.0 -> 1.6.1 means that you will need require 'active_directory' even if loaded from Gemfile #1

Open freibuis opened 9 years ago

freibuis commented 9 years ago

Hi,

since updating to revision 1.6.1 you will need to use

require 'active_directory'

regardless if you run this from bundle exec

otherwise when you run

ActiveDirectory::Base.setup(settings)

you will get

uninitialized constant ActiveDirectory::Base

this breaks behavior from 1.6.0

Mazwak commented 9 years ago

Sorry for the inconvenience. As the gem as no bin, could you tell me what you are trying to exec ?

freibuis commented 9 years ago

ok add the gem to you Gemfile require 'active_directory'

add a config or initializer that has the setting for the ActiveDirectory::Base.setup(settings)

bundle exec rails c

ActiveDirectory::User.find(:first, :userprincipalname => "john.smith@domain.com")

you will get

uninitialized constant ActiveDirectory::Base

The way around this would be to use require 'active_directory' in side the config or initializer

Thats the problem. 1.6.0 didnt need this. If the gem was in the gem file then it automatically required.