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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
91e1fb8bd265b7629491ab64c42f0906?d=identicon&s=25 Reid Thompson (Guest)
on 2007-12-14 22:05
(Received via mailing list)
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'
45196398e9685000d195ec626d477f0e?d=identicon&s=25 Trans (Guest)
on 2007-12-14 22:54
(Received via mailing list)
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.
91e1fb8bd265b7629491ab64c42f0906?d=identicon&s=25 Reid Thompson (Guest)
on 2007-12-15 04:46
(Received via mailing list)
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
7a4e995e378ef66de0ceaea5e1381ee1?d=identicon&s=25 George Moschovitis (Guest)
on 2007-12-15 09:03
(Received via mailing list)
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.
45196398e9685000d195ec626d477f0e?d=identicon&s=25 Trans (Guest)
on 2007-12-15 11:48
(Received via mailing list)
On Dec 15, 2:50 am, "George Moschovitis"
<george.moschovi...@gmail.com> 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.
7a4e995e378ef66de0ceaea5e1381ee1?d=identicon&s=25 George Moschovitis (Guest)
on 2007-12-15 12:04
(Received via mailing list)
no just send the bundle!

-g.
This topic is locked and can not be replied to.