Hmm... strange, again, since I can't replicate this. When this happens, do you get tons of activity records created in the activities table? Also, try changing line #6 of Activity.rb from
after_save :update_counter_on_user to after_create :update_counter_on_user On Wed, Nov 19, 2008 at 8:42 PM, Elijah Windsor <[EMAIL PROTECTED]> wrote: > > Hi Bruno, > > Thanks for taking time to look at this. Here's a stack trace from my > development.log: > > SystemStackError (stack level too deep): > /usr/local/lib/ruby/1.8/set.rb:89:in `empty?' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/attribute_methods.rb:64:in `generated_methods?' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/attribute_methods.rb:237:in `method_missing' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/attribute_methods.rb:245:in `method_missing' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/associations/association_proxy.rb:173:in `send' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/associations/association_proxy.rb:173:in > `method_missing' > /vendor/plugins/community_engine/engine_plugins/activity_tracker/ > lib/activity.rb:27:in `by' > /vendor/plugins/community_engine/engine_plugins/activity_tracker/ > lib/activity.rb:22:in `update_counter_on_user' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ > active_support/callbacks.rb:173:in `send' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ > active_support/callbacks.rb:173:in `evaluate_method' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ > active_support/callbacks.rb:161:in `call' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ > active_support/callbacks.rb:93:in `run' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ > active_support/callbacks.rb:92:in `each' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ > active_support/callbacks.rb:92:in `send' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ > active_support/callbacks.rb:92:in `run' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ > active_support/callbacks.rb:272:in `run_callbacks' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/callbacks.rb:298:in `callback' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/callbacks.rb:208:in `create_or_update' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/base.rb:2211:in `save_without_validation' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/validations.rb:911:in `save_without_dirty' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/dirty.rb:75:in `save_without_transactions' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/transactions.rb:106:in `save' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/connection_adapters/abstract/database_statements.rb: > 66:in `transaction' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/transactions.rb:79:in `transaction' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/transactions.rb:98:in `transaction' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/transactions.rb:106:in `save' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/transactions.rb:118:in `rollback_active_record_state!' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/transactions.rb:106:in `save' > /vendor/plugins/community_engine/engine_plugins/activity_tracker/ > lib/activity_tracker.rb:61:in `create_activity_from_self' > /vendor/plugins/community_engine/engine_plugins/activity_tracker/ > lib/activity_tracker.rb:25:in `acts_as_activity' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ > active_support/callbacks.rb:177:in `call' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ > active_support/callbacks.rb:177:in `evaluate_method' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ > active_support/callbacks.rb:161:in `call' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ > active_support/callbacks.rb:93:in `run' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ > active_support/callbacks.rb:92:in `each' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ > active_support/callbacks.rb:92:in `send' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ > active_support/callbacks.rb:92:in `run' > /vendor/plugins/community_engine/engine_config/initializers/ > attachment_fu_fix.rb:25:in `run_callbacks' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/callbacks.rb:298:in `callback' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/callbacks.rb:221:in `create_without_timestamps' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/timestamp.rb:29:in `create' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/base.rb:2483:in `create_or_update_without_callbacks' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/callbacks.rb:207:in `create_or_update' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/base.rb:2211:in `save_without_validation' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/validations.rb:911:in `save_without_dirty' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/dirty.rb:75:in `save_without_transactions' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/transactions.rb:106:in `save' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/connection_adapters/abstract/database_statements.rb: > 66:in `transaction' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/transactions.rb:79:in `transaction' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/transactions.rb:98:in `transaction' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/transactions.rb:106:in `save' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/transactions.rb:118:in `rollback_active_record_state!' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/transactions.rb:106:in `save' > /app/controllers/photos_controller.rb:94:in `create' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/mime_responds.rb:106:in `call' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/mime_responds.rb:106:in `respond_to' > /app/controllers/photos_controller.rb:93:in `create' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/base.rb:1166:in `send' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/base.rb:1166:in `perform_action_without_filters' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/filters.rb:579:in `call_filters' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/filters.rb:600:in `run_before_filters' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/filters.rb:176:in `call' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/filters.rb:176:in `around_proc' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ > active_support/callbacks.rb:177:in `call' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ > active_support/callbacks.rb:177:in `evaluate_method' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/filters.rb:154:in `call' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/filters.rb:597:in `run_before_filters' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/filters.rb:577:in `call_filters' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/filters.rb:600:in `run_before_filters' > /vendor/plugins/community_engine/lib/localized_application.rb: > 21:in `set_locale' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ > active_support/callbacks.rb:173:in `send' > /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.1/lib/ > active_support/callbacks.rb:173:in `evaluate_method' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/filters.rb:156:in `call' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/filters.rb:597:in `run_before_filters' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/filters.rb:577:in `call_filters' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/filters.rb:572:in `perform_action_without_benchmark' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/benchmarking.rb:68:in > `perform_action_without_rescue' > /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/benchmarking.rb:68:in > `perform_action_without_rescue' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/rescue.rb:201:in `perform_action_without_caching' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/caching/sql_cache.rb:13:in `perform_action' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/connection_adapters/abstract/query_cache.rb:33:in > `cache' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/ > active_record/query_cache.rb:8:in `cache' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/caching/sql_cache.rb:12:in `perform_action' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/base.rb:529:in `send' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/base.rb:529:in `process_without_filters' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/filters.rb:568:in > `process_without_session_management_support' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/session_management.rb:130:in `sass_old_process' > /usr/local/lib/ruby/gems/1.8/gems/haml-2.0.4/lib/sass/plugin/ > rails.rb:19:in `process' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/base.rb:389:in `process' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/dispatcher.rb:149:in `handle_request' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/dispatcher.rb:107:in `dispatch' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/dispatcher.rb:104:in `synchronize' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/dispatcher.rb:104:in `dispatch' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/dispatcher.rb:120:in `dispatch_cgi' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/dispatcher.rb:35:in `dispatch' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/ > rails.rb:76:in `process' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/ > rails.rb:74:in `synchronize' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/ > rails.rb:74:in `process' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/ > mongrel.rb:159:in `process_client' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/ > mongrel.rb:158:in `each' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/ > mongrel.rb:158:in `process_client' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/ > mongrel.rb:285:in `run' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/ > mongrel.rb:285:in `initialize' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/ > mongrel.rb:285:in `new' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/ > mongrel.rb:285:in `run' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/ > mongrel.rb:268:in `initialize' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/ > mongrel.rb:268:in `new' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/ > mongrel.rb:268:in `run' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/ > configurator.rb:282:in `run' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/ > configurator.rb:281:in `each' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/ > configurator.rb:281:in `run' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails: > 128:in `run' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/ > command.rb:212:in `run' > /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails: > 281 > > Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.1/lib/ > action_controller/templates/rescues/layout.erb (internal_server_error) > > Thanks, > > Elijah > > On Nov 18, 7:49 am, "Bruno Bornsztein" <[EMAIL PROTECTED]> > wrote: > > Hey guys, > > I'd love to see a stack trace, or other details on this problem you're > > having; the activity tracker is pretty central to CE, and I'd hate to > have > > people encounter problems. > > FWIW, I haven't encountered any activity tracker problems on any of the > 5+ > > CE sites I run. > > > > Thanks, > > Bruno > > > > On Mon, Nov 17, 2008 at 4:50 PM, Elijah Windsor <[EMAIL PROTECTED]> > wrote: > > > > > Hi James - Awesome, at least I'm not the only one. Do you or anyone > > > else know of a way to keep acts_as_activity active though, without > > > hitting these walls? > > > > > Thanks, > > > > > Elijah > > > > > On Nov 14, 8:31 pm, ashchan <[EMAIL PROTECTED]> wrote: > > > > I've encountered the same problem several times. I didn't remember > > > > very well, but it seemed the acts_as_activity will save the user > > > > object in some cases, which in turn trigger an after_save callback > and > > > > trigger an activity record again. > > > > > > In my project I solved this problem by removing the following > callback > > > > in the acts_as_activity's activity.rb: > > > > > > after_save :update_counter_on_user > > > > > > I wasn't really willing to modify the plugin but this did solving my > > > > problem. > > > > > > James Chanhttp://blog.ashchan.com > > > > > > On Nov 15, 5:12 am, Elijah Windsor <[EMAIL PROTECTED]> wrote: > > > > > > > Hi again - found the issue - the main cause of the problem was > > > > > > > acts_as_activity :user, :if => Proc.new{|record| > record.parent.nil?} > > > > > in Photo.rb > > > > > > > I took that out and now all is well. I think this is the second > time > > > > > I've had a stack overflow with acts_as_activity - the first was > with > > > > > User.rb. Anybody else have these issues with it, or know a good > fix? > > > > > > > Elijah > > > > > > > On Nov 14, 4:23 am, Elijah Windsor <[EMAIL PROTECTED]> wrote: > > > > > > > > Hello, > > > > > > > > Can someone help me with my issue with uploading pictures? All I > get > > > > > > is that subject and: > > > > > > > > stack level too deep > > > > > > > > I traced the stack, and it happens in :action => 'create' on the > line > > > > > > where @photo.user = @user. If I take this out, it works > fine. > > > > > > > > One more thing - it will work the first time I start mongrel - > every > > > > > > time after that I get the SystemStackError. > > > > > > > > Thank you, > > > > > > > > Elijah > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
