#37 ✓resolved
inkedmn

undefined method `acts_as_authentic_config'

Reported by inkedmn | February 10th, 2009 @ 02:54 AM

Installed authlogic version 1.4.1 via ruby gems about 4 days ago, ran through the basic setup (located here), and when I visit http://localhost:3000/user_sessi..., I get the above error.

I'm not sure what other information you need, other than the various version numbers, so here they are:

Ruby: 1.8.6 Rails: 2.2.2 Authlogic: 1.4.1 Gem: 1.3.1

I've copied the accompanying trace into a text file and attached it, but please let me know if you'd like it another way.

This is my first actual ruby/rails project, so it's entirely possible that I've made a rather glaring mistake, so please do let me know if this is a PEBKAC error :)

Thanks!

Comments and changes to this ticket

  • Ben Johnson

    Ben Johnson February 11th, 2009 @ 02:50 AM

    • State changed from “new” to “open”

    I have been getting reports of this error and all of them have been caused due to something unrelated to authlogic. One guy deleted the resource_controller plugin and everything worked again. Another forgot to run the "rake rails:update" command after updating rails. This really seems like a caching issue. Can you config that you are getting this error in the console?

    Maybe try doing:

    User.acts_as_authentic_config

    Try that in your console and see if that works. If so, then its definitely a caching error.

  • inkedmn

    inkedmn February 14th, 2009 @ 01:48 AM

    I get the error in the console as well, I'm afraid:

    Loading development environment (Rails 2.2.2)

    User.acts_as_authentic_config NoMethodError: undefined method acts_as_authentic_config' for #<Class:0x20b6f10>

    from /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:1833:in `method_missing'
    from (irb):1
    
    

    Anything else I can try?

  • Ben Johnson

    Ben Johnson February 14th, 2009 @ 03:35 AM

    • State changed from “open” to “resolved”

    This really is an error unrelated to authlogic. What's causing it is a caching problem, acts_as_authentic is not being executed for some reason. I have a very high traffic application using rails 2.2.2 / authlogic and it works just fine. I wish I could help more but the rails caching has changed so much I have no idea how it works anymore.

  • ronin-47418 (at lighthouseapp)

    ronin-47418 (at lighthouseapp) February 14th, 2009 @ 09:39 AM

    • Tag set to config, configuration, initializers

    inkedmn:

    I've had this problem too. Not sure if this'll work for you, but once I created a file in the config/initializers directory (I called it auth.rb), it worked.

    UserSession.configure do |config|

    config.disable_magic_states = true
    # ...
    
    

    end

    See top of: http://authlogic.rubyforge.org/c...

    Then again, this might not work for you because I was able to run User.acts_as_authentic_config in the console.

    Ben, this is such an awesome gem. Thanks for creating it.

  • mastmead

    mastmead February 27th, 2010 @ 08:20 PM

    I had a similar problem with acts_as_authentic being undefined when attempting to create a new user. After many hours, my solution was to simply reboot the web server. It all works fine now!

  • Kevin Kohrt

    Kevin Kohrt August 29th, 2010 @ 01:00 PM

    • Milestone order changed from “0” to “0”

    Bizarre. I had the same problem. I added require 'authlogic' right after the config block in environment.rb, and the config/initializers/auth.rb trick ronin mentioned, and that worked in my staging environment, but not in the production environment running on the same box (different rails app and db, though).

    I am using memcached, though, and the production instance is much more likely to have user objects stored away somewhere at a given time, if caching truly is an issue.

    Still, I'd recommend the require and auth.rb as a start.

    Here is my gem list if that triggers any ideas. I should probably prune older gems....

    actionmailer (2.3.8, 2.3.5, 2.3.4)
    actionpack (2.3.8, 2.3.5, 2.3.4)
    activerecord (2.3.8, 2.3.5, 2.3.4)
    activeresource (2.3.8, 2.3.5, 2.3.4)
    activesupport (2.3.8, 2.3.5, 2.3.4)
    authlogic (2.1.3, 2.1.2)
    builder (2.1.2)
    cancan (1.1.1)
    capistrano (2.5.14, 2.5.9)
    cucumber (0.6.2, 0.3.104)
    devise (1.0.7, 1.0.6)
    devise_invitable (0.2.2)
    diff-lcs (1.1.2)
    faker (0.3.1)
    fastthread (1.0.7)
    highline (1.5.2, 1.5.1)
    json_pure (1.2.0)
    memcache-client (1.7.7)
    net-scp (1.0.2)
    net-sftp (2.0.4, 2.0.2)
    net-ssh (2.0.19, 2.0.15)
    net-ssh-gateway (1.0.1)
    newrelic_rpm (2.10.5, 2.9.9)
    nokogiri (1.4.1, 1.3.3)
    passenger (2.2.9, 2.2.5)
    pickle (0.2.11)
    polyglot (0.2.9)
    postgres (0.7.9.2008.01.28)
    rack (1.1.0, 1.0.1, 1.0.0)
    rack-test (0.5.3)
    rails (2.3.8, 2.3.5, 2.3.4)
    rake (0.8.7)
    rdoc (2.4.3)
    rspec (1.3.0, 1.2.9)
    rspec-rails (1.3.2, 1.2.9)
    system_timer (1.0)
    term-ansicolor (1.0.4)
    treetop (1.4.3, 1.4.2)
    tzinfo (0.3.16, 0.3.15)
    warden (0.10.7)
    webrat (0.7.0, 0.5.3)
    will_paginate (2.3.12, 2.3.11, 2.2.2)

  • Thanos

    Thanos November 15th, 2018 @ 06:14 AM

    There are the nice post it is the amazing so need to access here http://addprinterwindows10.com/ and install the add printer wizard windows 10 this is the best way for look the all update to device thanks.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Object based authentication solution that handles all of the non sense for you. It's as easy as ActiveRecord is with a database.

People watching this ticket

Attachments

Pages