# ERROR: undefined local variable or method \`attributes' for	YAML::Stream:Class

**URL:** <https://www.ruby-forum.com/t/error-undefined-local-variable-or-method-attributes-for-yaml-class/123202>\
**Category:** Nitro\
**Created:** [December 14, 2007, 10:05pm UTC](https://www.ruby-forum.com/t/error-undefined-local-variable-or-method-attributes-for-yaml-class/123202 "2007-12-14T22:05:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lycanthrope](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/a88e57/32.png) [@lycanthrope](https://www.ruby-forum.com/u/lycanthrope)\
**Post date:** [December 14, 2007, 10:05pm UTC](https://www.ruby-forum.com/t/error-undefined-local-variable-or-method-attributes-for-yaml-class/123202/1 "2007-12-14T22:05:54Z")

</div>

This was working, anyone have any pointers to what i’ve fouled up?

rthompso@raker ~/src/repo.nitroproject.org/nitro/demo/blog $  
RUBYOPT="-rubygems -I$NITRO\_HOME/part/lib  
-I$NITRO\_HOME/script/lib/glycerin" ruby app.rb  
REPO\_ROOT is /home/rthompso/src/repo.nitroproject.org/script/lib/…/…  
INFO: Og uses the Postgresql store.  
ERROR: undefined local variable or method `attributes' for YAML::Stream:Class /home/rthompso/src/repo.nitroproject.org/script/lib/../../og/lib/og/util/ann_attr.rb:51:in`serializable\_attributes’  
/home/rthompso/src/repo.nitroproject.org/script/lib/…/…/og/lib/og/manager.rb:192:in  
`manageable?' /home/rthompso/src/repo.nitroproject.org/script/lib/../../og/lib/og/manager.rb:222:in`manageable\_classes’  
/home/rthompso/src/repo.nitroproject.org/script/lib/…/…/og/lib/og/manager.rb:218:in  
`each_object' /home/rthompso/src/repo.nitroproject.org/script/lib/../../og/lib/og/manager.rb:218:in`manageable\_classes’  
/home/rthompso/src/repo.nitroproject.org/script/lib/…/…/og/lib/og/manager.rb:239:in  
`manage_classes' /home/rthompso/src/repo.nitroproject.org/script/lib/../../og/lib/og/main.rb:192:in`start’  
/home/rthompso/src/repo.nitroproject.org/nitro/demo/blog/conf/debug.rb:14:in  
`setup_og' /home/rthompso/src/repo.nitroproject.org/nitro/demo/blog/conf/debug.rb:32:in`setup’  
/home/rthompso/src/repo.nitroproject.org/script/lib/…/…/nitro/lib/nitro/application.rb:180:in  
`read_configuration_file' /home/rthompso/src/repo.nitroproject.org/script/lib/../../nitro/lib/nitro/application.rb:218:in`configure’  
/home/rthompso/src/repo.nitroproject.org/script/lib/…/…/nitro/lib/nitro/application.rb:111:in  
`start' app.rb:27 LOGGED FROM: /home/rthompso/src/repo.nitroproject.org/script/lib/../../nitro/lib/nitro/application.rb:184:in`read\_configuration\_file’

---

<div class="post-metadata">

**Author:** ![lycanthrope](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/a88e57/32.png) [@lycanthrope](https://www.ruby-forum.com/u/lycanthrope)\
**Post date:** [December 14, 2007, 10:54pm UTC](https://www.ruby-forum.com/t/error-undefined-local-variable-or-method-attributes-for-yaml-class/123202/2 "2007-12-14T22:54:01Z")

</div>

If you are using the brand spanking new release of Facets (2.2.0) it  
is because #attributes changed to #instance\_attributes to prevent name  
clashes with other libs. I’ve sent George a bundle with fixes, but  
he’ll need to apply it and probably do some touch up.

The new version also switches from using #class\_extension and  
ClassMethods hack to using the new definition of #is, which will  
automatically extend a Self sub-module. Eg.

module Foo  
module Self  
def q; “q”; end  
end  
end

class X  
is Foo  
end

X.q #=\> “q”

T.

---

<div class="post-metadata">

**Author:** ![lycanthrope](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/a88e57/32.png) [@lycanthrope](https://www.ruby-forum.com/u/lycanthrope)\
**Post date:** [December 15, 2007, 4:46am UTC](https://www.ruby-forum.com/t/error-undefined-local-variable-or-method-attributes-for-yaml-class/123202/3 "2007-12-15T04:46:20Z")

</div>

Trans wrote:

> If you are using the brand spanking new release of Facets (2.2.0) it  
> is because #attributes changed to #instance\_attributes to prevent name  
> clashes with other libs. I’ve sent George a bundle with fixes, but  
> he’ll need to apply it and probably do some touch up.

thanks, a gem update evidently brought me up to 2.2.0

rthompso@raker /usr/lib/ruby/gems/1.8/gems $ ls |grep facets  
facets-2.2.0

Reid

---

<div class="post-metadata">

**Author:** ![lycanthrope](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/a88e57/32.png) [@lycanthrope](https://www.ruby-forum.com/u/lycanthrope)\
**Post date:** [December 15, 2007, 9:03am UTC](https://www.ruby-forum.com/t/error-undefined-local-variable-or-method-attributes-for-yaml-class/123202/4 "2007-12-15T09:03:27Z")

</div>

Tom,

I applied your patch and still get errors when trying the blog example:

gmosx@kosh:~/code/public/nitro/demo/blog$ nitro  
INFO: Og uses the Mysql store.  
ERROR: undefined local variable or method `attributes' for Gem::OperationNotSupportedError:Class /home/gmosx/code/public/og/lib/og/util/ann_attr.rb:51:in`serializable\_attributes’  
/home/gmosx/code/public/og/lib/og/manager.rb:192:in `manageable?' /home/gmosx/code/public/og/lib/og/manager.rb:222:in`manageable\_classes’  
/home/gmosx/code/public/og/lib/og/manager.rb:218:in `each\_object’

can you please make sure that the blog example runs and send me a new  
bundle?

thanks,  
-g.

---

<div class="post-metadata">

**Author:** ![lycanthrope](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/a88e57/32.png) [@lycanthrope](https://www.ruby-forum.com/u/lycanthrope)\
**Post date:** [December 15, 2007, 11:48am UTC](https://www.ruby-forum.com/t/error-undefined-local-variable-or-method-attributes-for-yaml-class/123202/5 "2007-12-15T11:48:04Z")

</div>

On Dec 15, 2:50 am, “George M.”  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> /home/gmosx/code/public/og/lib/og/manager.rb:192:in `manageable?' /home/gmosx/code/public/og/lib/og/manager.rb:222:in `manageable\_classes’  
> /home/gmosx/code/public/og/lib/og/manager.rb:218:in `each\_object’
> 
> can you please make sure that the blog example runs and send me a new  
> bundle?

hmm… that should have been in the bundle. let me see…

ok. i got it. i had a little require jerry-rig in ann\_attr.rb that I  
didn’t want to bunlde, but I accidentally left this change out too.  
I’ll send you the new bundle.

Should I go ahead and pull first?

T.

---

<div class="post-metadata">

**Author:** ![lycanthrope](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/a88e57/32.png) [@lycanthrope](https://www.ruby-forum.com/u/lycanthrope)\
**Post date:** [December 15, 2007, 12:04pm UTC](https://www.ruby-forum.com/t/error-undefined-local-variable-or-method-attributes-for-yaml-class/123202/6 "2007-12-15T12:04:28Z")

</div>

no just send the bundle!

-g.
