Putting your code to force the reload in development.rb did not make
any difference for the behavior in development - still works as
expected.

I admit that I did not try the vanilla CE, because I believe that it
will work.

Yes, I'm overriding users_controller.  Here is what I found out:

When I remove :activate from "cache_sweeper :taggable_sweeper, :only
=> [:activate, :update, :destroy]" in user_controller.rb (the one in
my app/controller directory), the application redirects correctly.

Otherwise, for some reason, the following code in actionpack-2.2.2/lib/
action_controller/caching/sweeping.rb gets called twice, the 2nd time
with self.controller already nil:
        def after(controller)
          callback(:after) if controller.perform_caching
          # Clean up, so that the controller can be collected after
this request
          self.controller = nil
        end

1st time called:
self: #<TaggableSweeper:0x719e464>
self.controller: #<UsersController:0x7133074>

2nd time called:
self: #<TaggableSweeper:0x719e464>
self.controller: nil

I'm still a bit out of my league in determining the real cause and
will appreciate any additional support.  Maybe I'm just confused on
what I need to minimally have in the controllers that I would like to
override.  Is there any documentation I should read.

Andreas

On May 26, 5:29 pm, Bruno Bornsztein <[email protected]>
wrote:
> This sounds like an installation issue or a conflict with your app's code.
> Try installing the vanilla CE app and see if that works for you:
> rails cetest 
> -mhttp://github.com/bborn/communityengine/raw/edge/community_engine_set...
>
> If you're overriding the users_controller.rb, you may be having some code
> reloading issues. Try forcing CE to reload, in your development.rb:
>
> config.after_initialize do
>   ActiveSupport::Dependencies.load_once_paths =
> ActiveSupport::Dependencies.load_once_paths.select {|path| (path =~
> /(community_engine)/).nil? }
> end
>
> Good luck!
> Bruno
>
> On Tue, May 26, 2009 at 5:28 PM, moritz <[email protected]> wrote:
>
> > Just when I thought, it was working, I'm hitting the next issue (see
> > stack trace below).  I've changed the activate call in
> > users_controller to redirect to a profile edit page instead of the
> > welcome, using redirect_to edit_user_path(@user).
>
> > Again, this only happens in production and works in development.  I
> > also can invokehttp://localhost/the-user/editdirectly without
> > issues.
>
> > What am I missing?
>
> > Thanks,
>
> > Andreas
>
> > Processing UsersController#activate (for ::1 at 2009-05-26 15:09:18)
> > [GET]
> >  Parameters: {"id"=>"ceb06fdf93fe9db4595edf0fe3b1b07cc4e12bcc"}
> > Sent mail to the-u...@...
> > Redirected to /the-user/edit
>
> > NoMethodError (undefined method `controller_name' for nil:NilClass):
> >    /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> > caching/sweeping.rb:83:in `callback'
> >    /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> > caching/sweeping.rb:65:in `after'
> >    /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> > filters.rb:208:in `around_proc'
> >     /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> > callbacks.rb:182:in `call'
> >    /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> > callbacks.rb:182:in `evaluate_method'
> >     /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> > filters.rb:184:in `call'
> >    /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> > filters.rb:635:in `run_before_filters'
> >    /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> > filters.rb:615:in `call_filters'
> >    /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> > filters.rb:638:in `run_before_filters'
> >    /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> > filters.rb:189:in `call'
> >    /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> > filters.rb:189:in `call'
> >    /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> > filters.rb:635:in `run_before_filters'
> >    /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> > filters.rb:615:in `call_filters'
> >    /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> > filters.rb:638:in `run_before_filters'
> >    /vendor/plugins/community_engine/lib/localized_application.rb:
> > 22:in `set_locale'
>
> > On May 26, 12:43 pm, moritz <[email protected]> wrote:
> > > I tracked it down to a missing APP_URL in production.rb.  It was a
> > > somewhat obscure error message ;-).
>
> > > This brings me to the question: What is the status on eliminating
> > > APP_URL?  I found this thread:
> >http://groups.google.com/group/communityengine/browse_thread/thread/4...
> > > from 9/08.  Any change since then?
>
> > > Thanks,
>
> > > Andreas
>
> > > On May 25, 8:09 pm, moritz <[email protected]> wrote:
>
> > > > This only happens in production, running under Passenger or Mongrel
> > > > (i.e., RAILS_ENV=production script/server) and I can't figure out how
> > > > to fix it.  It's CE master and Rails 2.2.2.  Any clues?
>
> > > > Thanks,
>
> > > > Andreas
>
> > > > The top of the stack trace:
> > > >     /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> > > > dependencies.rb:419:in `load_missing_constant'
> > > >     /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> > > > dependencies.rb:77:in `const_missing'
> > > >     /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> > > > dependencies.rb:89:in `const_missing'
> > > >     /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> > > > dependencies.rb:95:in `send'
> > > >     /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> > > > dependencies.rb:95:in `const_missing'
> > > >     /vendor/plugins/community_engine/app/models/user.rb:18
> > > >     /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> > > > callbacks.rb:182:in `call'
> > > >     /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> > > > callbacks.rb:182:in `evaluate_method'
> > > >     /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> > > > callbacks.rb:166:in `call'
> > > >     /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> > > > callbacks.rb:93:in `run'
> > > >     /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> > > > callbacks.rb:92:in `each'
> > > >     /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> > > > callbacks.rb:92:in `send'
> > > >     /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> > > > callbacks.rb:92:in `run'
> > > >     /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> > > > callbacks.rb:277:in `run_callbacks'
> > > >     /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/
> > > > callbacks.rb:315:in `callback'
> > > >     /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/
> > > > callbacks.rb:238:in `create_without_timestamps'
> > > >     /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/
> > > > timestamp.rb:29:in `create'
> > > >     /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/
> > > > base.rb:2699:in `create_or_update_without_callbacks'
> > > >     /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/
> > > > callbacks.rb:222:in `create_or_update'
> > > >     /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/
> > > > base.rb:2383:in `save_without_validation'
> > > >     /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/
> > > > validations.rb:1009:in `save_without_dirty'
> > > >     /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/
> > > > dirty.rb:79:in `save_without_transactions'
> > > >     /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/
> > > > transactions.rb:179:in `send'
> > > >     /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/
> > > > transactions.rb:179:in `with_transaction_returning_status'
> > > >     /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/
> > > > connection_adapters/abstract/database_statements.rb:66:in
> > > > `transaction'
> > > >     /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/
> > > > transactions.rb:129:in `transaction'
> > > >     /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/
> > > > transactions.rb:138:in `transaction'
> > > >     /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/
> > > > transactions.rb:178:in `with_transaction_returning_status'
> > > >     /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/
> > > > transactions.rb:146:in `save'
> > > >     /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/
> > > > transactions.rb:158:in `rollback_active_record_state!'
> > > >     /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/
> > > > transactions.rb:146:in `save'
> > > >     /app/controllers/users_controller.rb:120:in `create'
--~--~---------~--~----~------------~-------~--~----~
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