4

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?

Nakilon
  • 34,866
  • 14
  • 107
  • 142
Alexey Poimtsev
  • 2,845
  • 3
  • 35
  • 63
  • I'm using bundler on 2.3.5 and getting the same error. Any know fix? gem 'authlogic', '2.1.3' gem 'oauth', '0.3.6' gem 'authlogic-oauth', '1.0.8', :require => 'authlogic_oauth' – johnml Feb 20 '10 at 03:38

5 Answers5

1

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
  • 11
  • 1
  • This link is also broken. Here's a cached version: http://webcache.googleusercontent.com/search?q=cache:http://futureadapter.com/2009/11/13/authlogic-plugin-errorfix/ – Jay Adkisson May 23 '11 at 23:39
0

did you include the authlogic main-gem?

Maybe this helps you:

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

BvuRVKyUVlViVIc7
  • 11,641
  • 9
  • 59
  • 111
0

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
  • 10,975
  • 11
  • 58
  • 81
0

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
  • 958
  • 8
  • 11
0

In Rails 3, I resolved this issue by explicitly depending on authlogic '~>2.1.6' before any authlogic plugins in the Gemfile. Magically went away.

Jay Adkisson
  • 461
  • 2
  • 3