[Nitro] before-hook doesn't work anymore

Bryan Soto bryan.a.soto at gmail.com
Sat Nov 19 13:05:13 EST 2005


Only way I can get a NoMethodError for before is if I call it before any
properties are defined. I don't think that's your problem since you said
you're upgrading.

Could you share the model.rb file? Or at least a small portion that causes
the same error?

Re: super, you've pretty much got it. method_missing is called if a class or
it's super-classes don't define a method. That's how we get George's fun
find_by_such_and_such methods without having to define them. The super call
in this case means "I don't know what to do with this message." and hands it
off to the super class in case it does. And if it get's to Object, Object
throws that nice little error message you got.

The methods are actually defined (glue/lib/glue/aspects.rb). I don't think
there is any method_missing magic for aspects.


On 11/19/05, Michael Fellinger <m.fellinger at gmail.com> wrote:
> Hey list,
> I have one serious problem with switching to 0.25.0 here.
> when i try to use this hook:
> before { puts "doesn't work" }, :on [:og_delete]
> i get following nice error at startup, and nitro shuts down.
> /usr/lib/ruby/gems/1.8/gems/og-0.25.0/lib/og/entity.rb:376:in
> `method_missing': undefined method `before' for OgFile:Class
> (NoMethodError)
> from ./src/model.rb:30
> from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in
> `require'
> from /var/www/current/nixel/public/../run.rb:11
> from /var/www/current/nixel/public/fcgi.rb:6
> well, having this error wouldn't be that bad, if it wasn't a very special
> error - it points to method_missing (more correct - line 376) and what is
> in
> this line:
> super
> that's it. No idea what voodoo is going on here - my ruby-instinct says me
> that this is an inherited class/module and takes the method_missing of the
> previous class in this special case. (i guess when in this method_missing
> no
> rule is defined for 'before') and now it fails even in the previous
> defined
> (if there is one defined... maybe it's only a call to an error-method?)
> can somebody help me on this?
> thx in pre,
> manveru
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051119/eecd8115/attachment.html 

More information about the Nitro-general mailing list