Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
horaceho opened this issue Mar 5, 2010 · 3 comments

Comments

@horaceho
Copy link

horaceho commented Mar 5, 2010

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
    Copy link
    Author

    horaceho commented Mar 5, 2010

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

    @springbok
    Copy link
    Owner

    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.

    @jcoyne
    Copy link

    jcoyne commented Jul 16, 2010

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

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    None yet
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants