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


#1

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:inserializable_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:inmanageable_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:inmanageable_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:instart’
/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:insetup’
/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:inconfigure’
/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:inread_configuration_file’


#2

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.


#3

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


#4

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:inserializable_attributes’
/home/gmosx/code/public/og/lib/og/manager.rb:192:in manageable?' /home/gmosx/code/public/og/lib/og/manager.rb:222:inmanageable_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.


#5

On Dec 15, 2:50 am, “George M.”
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:inmanageable_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.


#6

no just send the bundle!

-g.