# NoMethodError in User sessionsController#create

**URL:** <https://www.ruby-forum.com/t/nomethoderror-in-user-sessionscontroller-create/194754>\
**Category:** Rails\
**Created:** [September 9, 2010, 11:28pm UTC](https://www.ruby-forum.com/t/nomethoderror-in-user-sessionscontroller-create/194754 "2010-09-09T23:28:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![learningruby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/6bbea6/32.png) [@learningruby](https://www.ruby-forum.com/u/learningruby)\
**Post date:** [September 9, 2010, 11:28pm UTC](https://www.ruby-forum.com/t/nomethoderror-in-user-sessionscontroller-create/194754/1 "2010-09-09T23:28:23Z")

</div>

Having a frustrating go at authenticating a user, pretty sure it must  
have something to do with gem version conflicts, but I can’t seem to  
find a solution that works.

No matter what username & password that is entered into the login form I  
get the same error screen:

NoMethodError in User sessionsController#create  
undefined method `protected\_password’ for #\<UserSession:  
{:login=\>“rtgh”, :password=\>""}\>

Trace:  
…/vendor/plugins/authlogic\_ldap/lib/authlogic\_ldap/session.rb:251:in  
`send' .../vendor/plugins/authlogic_ldap/lib/authlogic_ldap/session.rb:251:in`validate\_by\_ldap’  
…/vendor/rails/activesupport/lib/active\_support/callbacks.rb:178:in  
`send' .../vendor/rails/activesupport/lib/active_support/callbacks.rb:178:in`evaluate\_method’  
…/vendor/rails/activesupport/lib/active\_support/callbacks.rb:166:in  
`call' .../vendor/rails/activesupport/lib/active_support/callbacks.rb:93:in`run’  
…/vendor/rails/activesupport/lib/active\_support/callbacks.rb:92:in  
`each' .../vendor/rails/activesupport/lib/active_support/callbacks.rb:92:in`send’  
…/vendor/rails/activesupport/lib/active\_support/callbacks.rb:92:in  
`run' .../vendor/rails/activesupport/lib/active_support/callbacks.rb:276:in`run\_callbacks’  
…/vendor/plugins/authlogic/lib/authlogic/session/callbacks.rb:83:in  
`validate' .../vendor/plugins/authlogic/lib/authlogic/session/validation.rb:64:in`valid?’  
…/vendor/plugins/authlogic/lib/authlogic/session/existence.rb:65:in  
`save' .../app/controllers/user_sessions_controller.rb:13:in`create’  
…/app/controllers/user\_sessions\_controller.rb:12:in `create’

I’ve installed the ruby version of Netbeans, and the only output from  
‘gem list’ is:  
\*\*\* LOCAL GEMS \*\*\*

net-ldap (0.1.1)  
rack (1.0.1)  
rake (0.8.7)  
sqlite3-ruby (1.3.1 x86-mingw32)

Doesn’t make sense to me, my buddy has the exact same gems on his  
machine, yet he is able to start up the server, run code and log in  
without problems.

Suggestions would be wonderful
