How to repro with a base CE edge install: create
<base>/app/controllers/users_controller.rb, containing:

class UsersController < BaseController
  cache_sweeper :taggable_sweeper, :only => [:activate, :update, :destroy]
end

Run in production mode, update your profile, hit save.

On Thu, Nov 19, 2009 at 8:50 AM, moritz <[email protected]> wrote:
> Knowing that I might repeat myself, I've reproducibly seen this error
> in the past when:
>
> (1) a controller is (partially) overridden
> (2) there is a cache_sweeper line in the controller
> (3) config.action_controller.perform_caching = true
>
> Currently, my work-around is to comment the cache_sweeper out (in the
> overriding controller), but I'm interested in a real solution.
>
> Valeri's assessment in the following thread got me on the right track
> to eliminate the issue: 
> http://groups.google.com/group/communityengine/browse_thread/thread/b84154e5228bf9f3?pli=1
>
> Please also note, that my last CE upgrade is a while back.  Let me
> know if I can help any further.
>
> On Nov 18, 6:38 pm, Bruno Bornsztein <[email protected]>
> wrote:
>> CE version (with git commit sha)?
>> Rails version?
>> Any controllers or models overridden?
>> Can you repro this with a blank app?
>>
>> Thanks, we'll get this tracked down.
>>
>> On Wed, Nov 18, 2009 at 8:23 PM, mike muldoon <[email protected]> wrote:
>> > Starting the app locally in production mode, I can now repro it. That
>> > eliminates passenger.
>>
>> > In config/environments/production.rb, setting this to false fixes the bug:
>> > config.action_controller.perform_caching             = false
>>
>> > Not really a fix, but at least a clue.
>>
>> > On Wed, Nov 18, 2009 at 6:02 PM, Bruno Bornsztein
>> > <[email protected]> wrote:
>> >> I doubt passenger is the culprit (I have several sites running on
>> >> Passenger with no problems).
>>
>> >> On Wed, Nov 18, 2009 at 8:01 PM, mike muldoon <[email protected]> 
>> >> wrote:
>> >>> My staging/prod environments use passenger. I'm working with my
>> >>> hosting provider to restart with mongrel, and see if that has any
>> >>> effect.
>>
>> >>> I'll try a fresh CE install, too.
>>
>> >>> On Wed, Nov 18, 2009 at 5:39 PM, Bruno Bornsztein
>> >>> <[email protected]> wrote:
>> >>>> Hi guys,
>> >>>> I'd love to help fix this, but I can't reproduce it locally. Here are
>> >>>> the steps I'm taking:
>> >>>> using rails 2.3.4
>>
>> >>>> $ rails ce_test 
>> >>>> -m http://www.communityengine.org/edge_install_template.rb
>>
>> >>>> In app/controllers, add:
>>
>> >>>> class UsersController < BaseController
>>
>> >>>>  def index
>> >>>>    #dummy
>> >>>>  end
>>
>> >>>> end
>>
>> >>>> Then I start my app with: thin start -e production
>>
>> >>>> No nil.controller_name error
>>
>> >>>> Can you guys post a process I can reproduce to get this error?
>>
>> >>>> On Wed, Nov 18, 2009 at 6:14 PM, mike muldoon <[email protected]> 
>> >>>> wrote:
>>
>> >>>>> I have started seeing this, too, (I am on edge). I can not repro in my
>> >>>>> dev environment, but I can repro it in production.
>>
>> >>>>> UsersController.update exits normally, but the redirection fails with
>> >>>>> this stacktrace:
>>
>> >>>>> NoMethodError (You have a nil object when you didn't expect it!
>> >>>>> The error occurred while evaluating nil.controller_name):
>> >>>>>  haml (2.0.9) lib/sass/plugin/rails.rb:19:in `process'
>> >>>>>  passenger (2.2.4)
>> >>>>> lib/phusion_passenger/rack/request_handler.rb:91:in `process_request'
>> >>>>>  passenger (2.2.4)
>> >>>>> lib/phusion_passenger/abstract_request_handler.rb:206:in `main_loop'
>> >>>>>  passenger (2.2.4)
>> >>>>> lib/phusion_passenger/railz/application_spawner.rb:376:in
>> >>>>> `start_request_handler'
>> >>>>>  passenger (2.2.4)
>> >>>>> lib/phusion_passenger/railz/application_spawner.rb:334:in
>> >>>>> `handle_spawn_application'
>> >>>>>  passenger (2.2.4) lib/phusion_passenger/utils.rb:182:in `safe_fork'
>> >>>>>  passenger (2.2.4)
>> >>>>> lib/phusion_passenger/railz/application_spawner.rb:332:in
>> >>>>> `handle_spawn_application'
>> >>>>>  passenger (2.2.4) lib/phusion_passenger/abstract_server.rb:351:in 
>> >>>>> `__send__'
>> >>>>>  passenger (2.2.4) lib/phusion_passenger/abstract_server.rb:351:in 
>> >>>>> `main_loop'
>> >>>>>  passenger (2.2.4) lib/phusion_passenger/abstract_server.rb:195:in
>> >>>>> `start_synchronously'
>> >>>>>  passenger (2.2.4) lib/phusion_passenger/abstract_server.rb:162:in 
>> >>>>> `start'
>> >>>>>  passenger (2.2.4)
>> >>>>> lib/phusion_passenger/railz/application_spawner.rb:213:in `start'
>> >>>>>  passenger (2.2.4) lib/phusion_passenger/spawn_manager.rb:261:in
>> >>>>> `spawn_rails_application'
>> >>>>>  passenger (2.2.4)
>> >>>>> lib/phusion_passenger/abstract_server_collection.rb:126:in
>> >>>>> `lookup_or_add'
>> >>>>>  passenger (2.2.4) lib/phusion_passenger/spawn_manager.rb:255:in
>> >>>>> `spawn_rails_application'
>> >>>>>  passenger (2.2.4)
>> >>>>> lib/phusion_passenger/abstract_server_collection.rb:80:in
>> >>>>> `synchronize'
>> >>>>>  passenger (2.2.4)
>> >>>>> lib/phusion_passenger/abstract_server_collection.rb:79:in
>> >>>>> `synchronize'
>> >>>>>  passenger (2.2.4) lib/phusion_passenger/spawn_manager.rb:254:in
>> >>>>> `spawn_rails_application'
>> >>>>>  passenger (2.2.4) lib/phusion_passenger/spawn_manager.rb:153:in
>> >>>>> `spawn_application'
>> >>>>>  passenger (2.2.4) lib/phusion_passenger/spawn_manager.rb:286:in
>> >>>>> `handle_spawn_application'
>> >>>>>  passenger (2.2.4) lib/phusion_passenger/abstract_server.rb:351:in 
>> >>>>> `__send__'
>> >>>>>  passenger (2.2.4) lib/phusion_passenger/abstract_server.rb:351:in 
>> >>>>> `main_loop'
>> >>>>>  passenger (2.2.4) lib/phusion_passenger/abstract_server.rb:195:in
>> >>>>> `start_synchronously'
>>
>> >>>>> Version info:
>>
>> >>>>> Rails 2.3.2
>> >>>>> ruby 1.8.6 (2008-08-11 patchlevel 287) [x86_64-linux] Ruby Enterprise
>> >>>>> Edition 20090610
>>
>> >>>>> actionmailer (2.3.2)
>> >>>>> actionpack (2.3.2)
>> >>>>> activerecord (2.3.2)
>> >>>>> activeresource (2.3.2)
>> >>>>> activesupport (2.3.2)
>> >>>>> authlogic (2.1.3)
>> >>>>> aws-s3 (0.6.2)
>> >>>>> builder (2.1.2)
>> >>>>> calendar_date_select (1.15)
>> >>>>> capistrano (2.5.5, 1.4.2)
>> >>>>> desert (0.5.0)
>> >>>>> extlib (0.9.12)
>> >>>>> fastthread (1.0.7)
>> >>>>> haml (2.0.9)
>> >>>>> highline (1.5.1)
>> >>>>> hpricot (0.8.1)
>> >>>>> htmlentities (4.0.0)
>> >>>>> icalendar (1.1.0)
>> >>>>> json (1.1.7)
>> >>>>> mime-types (1.16)
>> >>>>> mysql (2.7)
>> >>>>> needle (1.3.0)
>> >>>>> net-scp (1.0.2)
>> >>>>> net-sftp (2.0.2, 1.1.1)
>> >>>>> net-ssh (2.0.11, 1.1.4)
>> >>>>> net-ssh-gateway (1.0.1)
>> >>>>> ohai (0.3.2)
>> >>>>> passenger (2.2.4)
>> >>>>> postgres (0.7.9.2008.01.28)
>> >>>>> rack (1.0.0)
>> >>>>> rails (2.3.2)
>> >>>>> rake (0.8.7)
>> >>>>> rmagick (2.9.2)
>> >>>>> sqlite3-ruby (1.2.4)
>> >>>>> systemu (1.2.0)
>> >>>>> termios (0.9.4)
>> >>>>> xml-simple (1.0.12)
>>
>> >>>>> On Wed, Nov 18, 2009 at 12:29 PM, Levi Rosol <[email protected]> 
>> >>>>> wrote:
>> >>>>> > This looks similar to the issue I have been having.
>>
>> >>>>> > --
>> >>>>> > Levi Rosol
>> >>>>> > Twitter: @LeviRosol
>>
>> >>>>> > On Wed, Nov 18, 2009 at 11:41 AM, SS <[email protected]> 
>> >>>>> > wrote:
>>
>> >>>>> >> Hello,
>> >>>>> >> I spent the last whole week trying to fix the below error in
>> >>>>> >> Production. In Development it all works fine, however when I try to
>> >>>>> >> edit profile information for a user in production, I keep getting 
>> >>>>> >> the
>> >>>>> >> error message below. The interesting thing is that after I get this
>> >>>>> >> error message and visit my user profile, all the changes have been
>> >>>>> >> successfully committed in the database. I've overridden only the 
>> >>>>> >> index
>> >>>>> >> () method in my own users_controller.rb in the following manner:
>>
>> >>>>> >> require "RMagick"
>> >>>>> >> class UsersController < BaseController
>>
>> >>>>> >>  def index
>> >>>>> >>    # Some logic goes here.
>> >>>>> >>  end
>> >>>>> >> end
>>
>> >>>>> >>  I read and tried the suggested solution here:
>>
>> >>>>> >>http://groups.google.com/group/communityengine/browse_thread/thread/b...
>>
>> >>>>> >> This however didn't work for me, plus if it worked I would try to 
>> >>>>> >> find
>> >>>>> >> a different solution since I don't want to remove and duplicate the
>> >>>>> >> original file for any method that I override in i.e.
>> >>>>> >> users_controller.rb.
>>
>> >>>>> >> The Error message that I get after the database query is processed:
>>
>> >>>>> >> Processing UsersController#update (for 70.75.54.26 at 2009-11-18
>> >>>>> >> 09:21:45) [PUT]
>> >>>>> >>  Parameters: {"user"=>{"birthday(2i)"=>"11", "birthday(3i)"=>"4",
>> >>>>> >> "zip"=>"", "description"=>"<p>Test Description</p>", "birthday
>> >>>>> >> (1i)"=>"1994"}, "commit"=>"Save Changes",
>> >>>>> >> "authenticity_token"=>"4QLH9ovpWwefeZOavRXaz4BXt1Y/aTOfW3N7SvA=",
>> >>>>> >> "country_id"=>"1", "id"=>"administrator", "metro_area_id"=>"4",
>> >>>>> >> "tag_list"=>"", "state_id"=>"3"}
>> >>>>> >> Redirected tohttp://mypage.com/administrator
>>
>> >>>>> >> NoMethodError (undefined method `controller_name' for nil:NilClass):
>> >>>>> >>  haml (2.2.3) lib/sass/plugin/rails.rb:19:in `process'
>> >>>>> >>  /home/heroku_rack/lib/static_assets.rb:9:in `call'
>> >>>>> >>  /home/heroku_rack/lib/last_access.rb:25:in `call'
>> >>>>> >>  /home/heroku_rack/lib/date_header.rb:14:in `call'
>> >>>>> >>  thin (1.0.1) lib/thin/connection.rb:80:in `pre_process'
>> >>>>> >>  thin (1.0.1) lib/thin/connection.rb:78:in `catch'
>> >>>>> >>  thin (1.0.1) lib/thin/connection.rb:78:in `pre_process'
>> >>>>> >>  thin (1.0.1) lib/thin/connection.rb:57:in `process'
>> >>>>> >>  thin (1.0.1) lib/thin/connection.rb:42:in `receive_data'
>> >>>>> >>  eventmachine (0.12.6) lib/eventmachine.rb:240:in `run_machine'
>> >>>>> >>  eventmachine (0.12.6) lib/eventmachine.rb:240:in `run'
>> >>>>> >>  thin (1.0.1) lib/thin/backends/base.rb:57:in `start'
>> >>>>> >>  thin (1.0.1) lib/thin/server.rb:150:in `start'
>> >>>>> >>  thin (1.0.1) lib/thin/controllers/controller.rb:80:in `start'
>> >>>>> >>  thin (1.0.1) lib/thin/runner.rb:173:in `send'
>> >>>>> >>  thin (1.0.1) lib/thin/runner.rb:173:in `run_command'
>> >>>>> >>  thin (1.0.1) lib/thin/runner.rb:139:in `run!'
>> >>>>> >>  thin (1.0.1) bin/thin:6
>> >>>>> >>  /usr/local/bin/thin:20:in `load'
>> >>>>> >>  /usr/local/bin/thin:20
>>
>> >>>>> >> Please help with any ideas that you may have for me to try. It's 
>> >>>>> >> kind
>> >>>>> >> of a showstopper for me because users can't edit any profile
>> >>>>> >> information. I'm running on Heroku.
>>
>> >>>>> >> Cheers,
>> >>>>> >> Siyan
>>
>> >>>>> >> --
>>
>> >>>>> >> You received this message because you are subscribed to the Google 
>> >>>>> >> Groups
>> >>>>> >> "CommunityEngine" group.
>> >>>>> >> To post to this group, send email to 
>> >>>>> >> [email protected].
>> >>>>> >> For more options, visit this group at
>> >>>>> >>http://groups.google.com/group/communityengine?hl=.
>>
>> >>>>> > --
>>
>> >>>>> > You received this message because you are subscribed to the Google 
>> >>>>> > Groups
>> >>>>> > "CommunityEngine" group.
>> >>>>> > To post to this group, send email to
>>
>> ...
>>
>> read more »
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "CommunityEngine" group.
> To post to this group, send email to [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/communityengine?hl=.
>
>
>

--

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


Reply via email to