# Ldap.modify error

**URL:** <https://www.ruby-forum.com/t/ldap-modify-error/127084>\
**Category:** Ruby\
**Created:** [January 24, 2008, 8:51pm UTC](https://www.ruby-forum.com/t/ldap-modify-error/127084 "2008-01-24T20:51:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Glen\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/34f0e0/32.png) [@Glen\_H](https://www.ruby-forum.com/u/Glen_H)\
**Post date:** [January 24, 2008, 8:51pm UTC](https://www.ruby-forum.com/t/ldap-modify-error/127084/1 "2008-01-24T20:51:53Z")

</div>

I know this isn’t the best place for this question but I’ve tried the  
appropriate forum with no luck.

If any one is familiar with the net-ldap library please keep reading.

I am trying and failing to delete a value from an attribute in AD. When  
I  
pass ldap.modify the :delete operand it throws up. After looking at the  
source code I am lead to believe this is because I have given an invalid  
opcode. However :delete is documented as being valid. The doc actually  
implies that ldap.delete\_attribute gives the same functionality but that  
isn’t the case.

Here is the line of code that is puking:

ldap.modify(:dn =\>  
“cn=TestAccount,ou=CADUsers,ou=CADLab,dc=techno,dc=tvinet”, :operations  
=\>  
[:delete, :memberof,  
"cn=“CAD\_1001\_101,ou=CADGroups,ou=CADLab,dc=techno,dc=tvinet”])

This is the error that is being thrown:

undefined method ‘to\_ber\_enumerated’ for nil:NilClass

Any and all help is appreciated.

Thanks,  
Glen

–  
“Hey brother Christian with your high and mighty errand, Your actions  
speak  
so loud, I can’t hear a word you’re saying.”

-Greg Graffin (Bad Religion)
