NoMethodError in User sessionsController#create - Authlogic

You didn't post your view, but, maybe a typo via "User sessionsController"?

it's just user_sessions - new.html.erb <% title "Login" %>

<% form_for @user_session do |f| %>   <%= f.error_messages %>   <p>     <%= f.label :username %><br />     <%= f.text_field :username %>   </p>   <p>     <%= f.label :password %><br />     <%= f.password_field :password %>   </p>   <p><%= f.submit "Submit" %></p> <% end %>

and it was created automatically.. i didn't change to much in code..

OK, but do you see anything strange about:

"User sessionsController"?

Hmm, it looks strange, but I've checked all files and there's no typo, I even overwrite some code with code from screencast post, but still there's the same bug. I think it's connected with "undefined method `mb_chars' for "rzepak":String" but I don't know what to do with it

vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/login.rb:121:in `find_with_case' vendor/plugins/authlogic/lib/authlogic/acts_as_authentic/login.rb:110:in `find_by_smart_case_login_field' vendor/plugins/authlogic/lib/authlogic/session/scopes.rb:95:in `send' vendor/plugins/authlogic/lib/authlogic/session/scopes.rb:95:in `search_for_record' vendor/rails/activerecord/lib/active_record/base.rb:1852:in `with_scope' vendor/plugins/authlogic/lib/authlogic/session/scopes.rb:94:in `send' vendor/plugins/authlogic/lib/authlogic/session/scopes.rb:94:in `search_for_record' vendor/plugins/authlogic/lib/authlogic/session/password.rb:178:in `validate_by_password' vendor/rails/activesupport/lib/active_support/callbacks.rb:173:in `send' vendor/rails/activesupport/lib/active_support/callbacks.rb:173:in `evaluate_method' vendor/rails/activesupport/lib/active_support/callbacks.rb:161: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:272:in `run_callbacks' vendor/plugins/authlogic/lib/authlogic/session/callbacks.rb:71:in `validate' vendor/plugins/authlogic/lib/authlogic/session/validation.rb:62:in `valid?' vendor/plugins/authlogic/lib/authlogic/session/existence.rb:65:in `save' app/controllers/user_sessions_controller.rb:8:in `create'

Hi, I had the same issue - I think it has something to do with the latest version of Authlogic possibly requiring Ruby 1.9???, whereas I'm running 1.8.6 on my dev machine and I see you're running 1.8.7.

The commit 53834196c8f82cac6b105126e3d267246b7b2b67 from July 2, 2009 seems to be the issue: Use mb_chars when downcasing login to deal with international characters

Specifying the previous gem version in my Rails environment seemed to do the trick: config.gem 'authlogic', :version => "= 2.1.0"

Let me know how it goes.

I wrote an app today that used authlogic 2.1.1 on ruby 1.8.6 just fine.

-eric

Adam Hill wrote:

Hi, I had the same issue - I think it has something to do with the latest version of Authlogic possibly requiring Ruby 1.9???, whereas I'm running 1.8.6 on my dev machine and I see you're running 1.8.7.

The commit 53834196c8f82cac6b105126e3d267246b7b2b67 from July 2, 2009 seems to be the issue: Use mb_chars when downcasing login to deal with international characters

Specifying the previous gem version in my Rails environment seemed to do the trick: config.gem 'authlogic', :version => "= 2.1.0"

Let me know how it goes.

On Aug 3, 4:34�am, "Rzepak G." <rails-mailing-l...@andreas-s.net>

I had the same error. authlogic version 2.1.0 didn't help. Changing rails version from 2.1.0 to 2.3.3 did. I'm using Ruby 1.8.6.

I'm having the same problem when using both a login field and an email field. I get the no method error for the email field in any view. If I remove the login field from the migration and the views all works fine.

Im on rails 2.3.3 and ruby 1.8.7

I just installed the latest plugin and disabled the gem as suggested in Ben's google group but no joy.

Still looking for an answer...

Eric

I'm having the same problem when using both a login field and an email field. I get the no method error for the email field in any view. If I remove the login field from the migration and the views all works fine.

Im on rails 2.3.3 and ruby 1.8.7

I just installed the latest plugin and disabled the gem as suggested in Ben's google group but no joy.

Still looking for an answer...

Is this issue still pending? No fix for the ruby 1.8.7 users?

amit_pandya wrote:

This things happens because of version conflict of authlogic, either upgrade or remove current one and install old one

Adam Hill wrote: