views:

504

answers:

4

Hi, i've added code

config.gem "authlogic-oauth", :lib => "authlogic_oauth"

to the environment.rb file in my app and got error

undefined method 'add_acts_as_authentic_module' for ActiveRecord::Base::Class

is there any solution to solve it?

+1  A: 

did you include the authlogic main-gem?

Maybe this helps you:

http://github.com/tsechingho/authlogic_bundle/issues/unreads#issue/3

Lichtamberg
of course! This error is displayed when i'm adding authlogic-oauth, but when i'm deleting it - looks good.
Alexey Poimtsev
See the url above.. Maybe it helps?
Lichtamberg
that link no longer works
ThinkBohemian
That url is dead.
jspooner
+1  A: 

same problem on rails 3.0.0.beta3 with authlogic-openid

fix from: http://futureadapter.com/2009/11/13/authlogic-plugin-errorfix/

this code should be inside this file (mine path pasted): ~/.rvm/gems/ruby-1.9.1-p378/gems/authlogic-oid-1.0.4/lib/authlogic_openid.rb

code:

if ActiveRecord::Base.respond_to?(:add_acts_as_authentic_module)
  ActiveRecord::Base.send(:include, AuthlogicOpenid::ActsAsAuthentic)
  Authlogic::Session::Base.send(:include, AuthlogicOpenid::Session)
end
vysogot
thanks for the info...this fixed my problem! with rails 3
ThinkBohemian
A: 

I had this same problem but it was resolved when I removed the plugin version of Authlogic and included the gem via environment.rb.

jspooner
A: 

I was getting this error, too, but the above didn't fix it for me. After digging some more, it turns out I had v2.1.5 of authlogic specified in the environment.rb but only 2.1.3 was installed on the server. rake gems:install failed with the same error. Once I installed the 2.1.5 gem directly, everything went back to normal.

Greg Haygood