google-code-export / ruby-activeldap

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

Error with to_xml #43

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. script/console
2. Usuario.all.to_xml

What is the expected output?
The XML!

What do you see instead?
TypeError: can't convert nil into String
        from /var/lib/gems/1.8/gems/activeldap-
1.2.1/lib/active_ldap/xml.rb:73:in `pack'
        from /var/lib/gems/1.8/gems/activeldap-
1.2.1/lib/active_ldap/xml.rb:73:in `normalize_value'
        from /var/lib/gems/1.8/gems/activeldap-
1.2.1/lib/active_ldap/xml.rb:53:in `normalize_values'
        from /var/lib/gems/1.8/gems/activeldap-
1.2.1/lib/active_ldap/xml.rb:52:in `each'
        from /var/lib/gems/1.8/gems/activeldap-
1.2.1/lib/active_ldap/xml.rb:52:in `normalize_values'
        from /var/lib/gems/1.8/gems/activeldap-
1.2.1/lib/active_ldap/xml.rb:24:in `to_s'
        from /var/lib/gems/1.8/gems/activeldap-
1.2.1/lib/active_ldap/xml.rb:23:in `each'
        from /var/lib/gems/1.8/gems/activeldap-
1.2.1/lib/active_ldap/xml.rb:23:in `to_s'
        from /var/lib/gems/1.8/gems/builder-
2.1.2/lib/builder/xmlbase.rb:134:in `call'
        from /var/lib/gems/1.8/gems/builder-
2.1.2/lib/builder/xmlbase.rb:134:in `_nested_structures'
        from /var/lib/gems/1.8/gems/builder-
2.1.2/lib/builder/xmlbase.rb:58:in `method_missing'
        from /var/lib/gems/1.8/gems/builder-
2.1.2/lib/builder/xmlbase.rb:31:in `tag!'
        from /var/lib/gems/1.8/gems/activeldap-
1.2.1/lib/active_ldap/xml.rb:22:in `to_s'
        from /var/lib/gems/1.8/gems/activeldap-
1.2.1/lib/active_ldap/xml.rb:115:in `to_s'
        from /var/lib/gems/1.8/gems/activeldap-
1.2.1/lib/active_ldap/base.rb:953:in `to_xml'
        from /var/lib/gems/1.8/gems/activesupport-
2.3.5/lib/active_support/core_ext/array/conversions.rb:189:in `to_xml'
        from /var/lib/gems/1.8/gems/activesupport-
2.3.5/lib/active_support/core_ext/array/conversions.rb:189:in `each'
        from /var/lib/gems/1.8/gems/activesupport-
2.3.5/lib/active_support/core_ext/array/conversions.rb:189:in `to_xml'
        from /var/lib/gems/1.8/gems/builder-
2.1.2/lib/builder/xmlbase.rb:134:in `call'
        from /var/lib/gems/1.8/gems/builder-
2.1.2/lib/builder/xmlbase.rb:134:in `_nested_structures'
        from /var/lib/gems/1.8/gems/builder-
2.1.2/lib/builder/xmlbase.rb:58:in `method_missing'
        from /var/lib/gems/1.8/gems/builder-
2.1.2/lib/builder/xmlbase.rb:31:in `tag!'
        from /var/lib/gems/1.8/gems/activesupport-
2.3.5/lib/active_support/core_ext/array/conversions.rb:187:in `to_xml'

What version of the product are you using? On what operating system?
I'm using Debian Lenny 5.0.4, ruby 1.8
my gems:
*** LOCAL GEMS ***

actionmailer (2.3.5)
actionpack (2.3.5)
activeldap (1.2.1)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
builder (2.1.2)
gettext (2.1.0)
gettext_activerecord (2.1.0)
hoe (2.6.0)
json_pure (1.2.4)
locale (2.0.5)
log4r (1.1.7)
mkrf (0.2.3)
net-https-wrapper (1.0)
net-httpstub (0.0.2)
net-ldap (0.1.1)
rack (1.0.1)
rails (2.3.5)
rake (0.8.7)
ruby-activeldap (0.8.3.1)
ruby-mysql (2.9.2)
rubyforge (2.0.4)

Please provide any additional information below.

Original issue reported on code.google.com by ilusi0n.x@gmail.com on 16 Apr 2010 at 3:57

GoogleCodeExporter commented 9 years ago
It may be fixed in trunk.

Next time, please give us a script that reproduces a problem and works on our
environment too.
We need to know the definition of Usuario and retrieved LDAP data by 
Usuario.all at
this case.

Original comment by kou...@gmail.com on 25 Apr 2010 at 10:06