Hi,
I’m beginner in rails, and I wanted to add to my simple application
Authlogic. So I’ve watched #160 Authlogic - RailsCasts
and step-by-step done everything. And almost everything works fine,
except login in. After registration new user is automatically logged in,
he can edit his profile, but after clicking logout and trying to login
again I get error
NoMethodError in User sessionsController#create
undefined method `mb_chars’ for “rzepak”:String
My user_session_controller.rb:
class UserSessionsController < ApplicationController
def new @user_session = UserSession.new
end
def create @user_session = UserSession.new(params[:user_session])
if @user_session.save
flash[:notice] = “Successfully logged in.”
redirect_to root_url
else
render :action => ‘new’
end
end
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
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”
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”
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.
This things happens because of version conflict of authlogic, either
upgrade or remove current one and install old one
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”
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?
The error occurred while evaluating nil.+
This is nothing to do with the original subject of this thread. I
suggest starting a new thread with an appropriate subject. First
however examine the error message carefully and try and work out what
it means. There should be a stack trace showing which line the error
appeared on.
Colin
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.