#128 ✓resolved
josemx

undefined method `password' on Rails 2.3.1

Reported by josemx | June 19th, 2009 @ 07:20 PM

http://github.com/binarylogic/authlogic_example/tree/master
the example app does not work on Rails 2.3.2 with the Authlogic gem 2.0.14

NoMethodError in Users#new

Showing app/views/users/_form.erb where line #5 raised:

undefined method password' for #<User:0x249f6e0>

Comments and changes to this ticket

  • Ben Johnson

    Ben Johnson June 20th, 2009 @ 04:33 AM

    • State changed from “new” to “open”

    That's strange. I'm using authlogic in my 2.3.2 app just fine. I'll play around with that app and update it.

    Thanks!

  • Ben Johnson

    Ben Johnson June 20th, 2009 @ 04:38 AM

    • State changed from “open” to “resolved”

    I updated the example app: http://authlogicexample.binarylogic.com and it seems to be working fine.

  • TheBits

    TheBits July 19th, 2009 @ 07:24 AM

    • Assigned user cleared.

    @josemx you forgot to add acts_as_authentic to the user model.

  • trampanzee

    trampanzee August 4th, 2009 @ 11:35 AM

    • Assigned user set to “Ben Johnson”

    I have this same error and I'm using Rails 2.3.3 and I have "acts_as_authentic" in the user model.

  • trampanzee

    trampanzee August 4th, 2009 @ 11:41 AM

    Sorry. And I'm using Authlogic gem 2.1.1

  • trampanzee

    trampanzee August 4th, 2009 @ 12:51 PM

    Nevermind...I figured it out.

  • hariis

    hariis August 16th, 2009 @ 06:06 AM

    Everyone, Would you be kind enough to share what the exact fix is?

    Ben, what is the update you made to the example app?
    trampanzee, what did you do to fix?

    everything worked fine with rails version prior to upgrading to 2.3.3.

  • Charles Melbye

    Charles Melbye September 2nd, 2009 @ 05:45 PM

    Could you guys share the fix that you used? I'm still having problems with this.

    My /users/new action works perfectly locally in development, but on Heroku it's giving that exception and the error.

  • btelles

    btelles September 5th, 2009 @ 03:36 AM

    Soooo no one can help a brotha out?

  • Randy Syring

    Randy Syring January 3rd, 2010 @ 11:56 PM

    Make sure your User class is using acts_as_authentic:

    app/models/user.rb

    class User < ActiveRecord::Base
    acts_as_authentic end

    I did all kinds of troubleshooting and had somehow removed this when troubleshooting a different problem.

  • morgler

    morgler January 6th, 2010 @ 08:53 AM

    • Tag set to password heroku

    Any fixes for this problem yet? I have the exact same problem "undefined method password' for #<User...".

    Of course I DO have the acts_as_authentic in my User model and I have all the necessary DB fields (copy/pasted from examples). The strange thing: my app works fine on my local machine (Rails 2.3.5, sqlite DB): I can signup, login, logout. However, once I deploy the app to heroku.com, I get the error mentioned above (and yes, I migrated the DB ;)). What could be the problem here?

  • adally

    adally January 15th, 2010 @ 09:04 PM

    I was having the same problem on Heroku. Fixed it by adding require 'authlogic' to my application_controller.

  • David Glines

    David Glines May 23rd, 2019 @ 03:37 AM

    I'm looking for a Ruby on Rails tutorial in a book. Is there any pdf or doc file here? Not sure which Gemfile line there should be. I'm writing a test project for AuthLogic plugin with expert essay writers for hire online.

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

Pages