google-code-export / ruby-activeldap

Automatically exported from code.google.com/p/ruby-activeldap
Other
1 stars 1 forks source link

undefined method `search_with_limit' for #<LDAP::Conn:0x2aaab0227920> #49

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
activeldap-1.2.2

I was retrofitting some older code using ActiveLDAP.  I was doing searches such 
as:

mg = MailGroup.find(
  :first,
  :base => '',
  :scope => :sub,
  :filter => "(mail=#{addr})",
  :attributes => [ 'dn', 'mail' ]
)

Instead of receiving a result, as used occur, I am instead getting a stack 
trace.

I am noticing that the search_with_limit function is not defined in ldap.rb, 
but only in ldap_ext.rb

undefined method `search_with_limit' for #<LDAP::Conn:0x2aaab0227920>
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.2/lib/active_ldap/adapter/ldap.rb:178
:in `send'
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.2/lib/active_ldap/adapter/ldap.rb:178
:in `execute'
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.2/lib/active_ldap/adapter/base.rb:659
:in `log'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/core_ext/benc
hmark.rb:10:in `realtime'
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.2/lib/active_ldap/adapter/base.rb:659
:in `log'
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.2/lib/active_ldap/adapter/ldap.rb:178
:in `execute'
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.2/lib/active_ldap/adapter/ldap.rb:89:
in `search'
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.2/lib/active_ldap/adapter/base.rb:170
:in `search'
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.2/lib/active_ldap/adapter/base.rb:275
:in `operation'
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.2/lib/active_ldap/timeout.rb:15:in 
`call'
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.2/lib/active_ldap/timeout.rb:15:in 
`alarm'
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.2/lib/active_ldap/adapter/base.rb:321
:in `with_timeout'
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.2/lib/active_ldap/adapter/base.rb:274
:in `operation'
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.2/lib/active_ldap/adapter/base.rb:169
:in `search'
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.2/lib/active_ldap/adapter/ldap.rb:83:
in `search'
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.2/lib/active_ldap/adapter/base.rb:637
:in `root_dse'
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.2/lib/active_ldap/adapter/base.rb:625
:in `root_dse_values'
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.2/lib/active_ldap/adapter/base.rb:143
:in `naming_contexts'
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.2/lib/active_ldap/base.rb:647:in 
`compute_base'
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.2/lib/active_ldap/base.rb:434:in 
`base'
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.2/lib/active_ldap/operations.rb:203:i
n `split_search_value'
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.2/lib/active_ldap/operations.rb:40:in
 `search'
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.2/lib/active_ldap/operations.rb:284:i
n `find_every'
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.2/lib/active_ldap/operations.rb:257:i
n `find_initial'
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.2/lib/active_ldap/operations.rb:222:i
n `find'

<snipped>

Original issue reported on code.google.com by michael....@gmail.com on 29 Jul 2010 at 3:53

GoogleCodeExporter commented 9 years ago
I tested with using trunk and it appears to fix the issue.  The only change I 
had made was to checkout the trunk into vendor/plugins and re-test.

Original comment by michael....@gmail.com on 29 Jul 2010 at 4:25

GoogleCodeExporter commented 9 years ago
Can I close this issue?

Original comment by kou...@gmail.com on 29 Jul 2010 at 1:05

GoogleCodeExporter commented 9 years ago
Yes, but I wonder why the 1.2.2 Gem would give that error, but trunk did not?

Original comment by michael....@gmail.com on 29 Jul 2010 at 1:16

GoogleCodeExporter commented 9 years ago
Uhmm, it seems that lib/active_ldap/adapter/ldap_ext.rb isn't loaded. It should 
be loaded on creating LDAP connection 

Original comment by kou...@gmail.com on 30 Jul 2010 at 3:32