smerf icon indicating copy to clipboard operation
smerf copied to clipboard

A copy of ApplicationController has been removed from the module tree but is still active!

Open horaceho opened this issue 15 years ago • 3 comments

Got the error as title.

It seems the only fix from Google is to change:

config.cache_classes = false

to:

config.cache_classes = true

in config/environments/development.rb

the "unloadable" fix suggested by others does not work for me.

the error is hit at line 11 of the following code: 10:

  • <%= link_to 'Home', root_path %>
  • 11: <% if current_user %> 12:
  • <%= link_to 'ID: ' + current_user.login, edit_user_path(current_user) %>
  • 13:
  • IP:<%=h current_user.current_login_ip %>
  • 14:
  • <%= link_to 'Logout', logout_path %>
  • it seems that there is something wrong with the current_user method (defined application_controller.rb as suggested by Ryan's Railscasts ( http://asciicasts.com/episodes/160-authlogic )

    thanks

    horaceho avatar Mar 05 '10 09:03 horaceho

    the detail error: http://pastie.org/855261

    horaceho avatar Mar 05 '10 09:03 horaceho

    hi,

    I'm not sure if this is a smerf problem, it sounds like you have issues with authlogic. SMERF only requires you to set the ID of your user's record for example self.smerf_user_id = current_user.id how you do that is up to your application.

    springbok avatar Mar 08 '10 23:03 springbok

    To fix this, add 'unloadable' to all the Smerf models and controllers. See http://strd6.com/2009/04/cant-dup-nilclass-maybe-try-unloadable/

    jcoyne avatar Jul 16 '10 19:07 jcoyne