Are you overriding any controllers, by any chance?

On Wed, Feb 4, 2009 at 9:25 PM, SimianLogic <[email protected]> wrote:

>
> It looks like a modified form of this patch is in /vendor/plugins/
> community_engine/engine_config/initializers/attachment_fu_fix.rb
>
> This code works for me while in development mode, but as soon as I
> switch to a production environment uploading an image bombs out with a
> NoMethodError (chunk of the trace below, pointing back to the
> attachment_fu_fix file). Has anyone else run into this? Running in
> development all the time is a suboptimal solution.
>
> NoMethodError (undefined method `after_resize_callback_chain' for
> #<Class:0xb6ade4c0>):
>    /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
> active_record/base.rb:1833:in `method_missing'
>    /vendor/plugins/community_engine/engine_config/initializers/
> attachment_fu_fix.rb:25:in `send'
>    /vendor/plugins/community_engine/engine_config/initializers/
> attachment_fu_fix.rb:25:in `run_callbacks'
>    /vendor/plugins/community_engine/engine_config/initializers/
> attachment_fu_fix.rb:13:in `callback_with_args'
>    /vendor/plugins/community_engine/engine_plugins/attachment_fu/lib/
> technoweenie/attachment_fu/processors/rmagick_processor.rb:35:in
> `process_attachment'
>    /vendor/plugins/community_engine/engine_plugins/attachment_fu/lib/
> technoweenie/attachment_fu/processors/rmagick_processor.rb:22:in
> `call'
>    /vendor/plugins/community_engine/engine_plugins/attachment_fu/lib/
> technoweenie/attachment_fu/processors/rmagick_processor.rb:22:in
> `with_image'
>    /vendor/plugins/community_engine/engine_plugins/attachment_fu/lib/
> technoweenie/attachment_fu.rb:317:in `with_image'
>    /vendor/plugins/community_engine/engine_plugins/attachment_fu/lib/
> technoweenie/attachment_fu/processors/rmagick_processor.rb:31:in
> `process_attachment'
>
> On Jan 21, 12:58 pm, simplicoder <[email protected]> wrote:
> > I got this error when doing a rake community_engine:test in rails
> > 2.2.2 install of CE...
> > Error:undefined method `after_attachment_saved_callback_chain'
> >
> > This seems to have been fixed in the March 2008 version of
> > attachument_fu according to its CHANGELOG on github...
> >
> > But implementing the monkeypatch it references athttp://
> blog.methodmissing.com/2008/1/19/edge-callback-refactorings-at...
> >
> > into attachment_fu_hacks.rb is the easiest fix.
> >
> > In defense of linkrot, the code is:
> > module Technoweenie
> >   module AttachmentFu
> >     module InstanceMethods
> >
> >       def self.included( base )
> >         base.define_callbacks *
> > [:after_resize, :after_attachment_saved, :before_thumbnail_saved]
> >       end
> >
> >       def callback_with_args(method, arg = self)
> >          notify(method)
> >
> >           result = run_callbacks(method, { :object => arg }) { |
> > result, object| result == false }
> >
> >           if result != false && respond_to_without_attributes?(method)
> >             result = send(method)
> >           end
> >
> >           return result
> >       end
> >
> >       def run_callbacks(kind, options = {}, &block)
> >         options.reverse_merge!( :object => self )
> >         ::ActiveSupport::Callbacks::Callback.run(self.class.send("#
> > {kind}_callback_chain"), options[:object], options, &block)
> >       end
> >     end
> >   end
> > end
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CommunityEngine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/communityengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to