我已经添加了代码
config.gem "authlogic-oauth", :lib => "authlogic_oauth"添加到我的应用程序中的environment.rb文件中,并收到错误
undefined method 'add_acts_as_authentic_module' for ActiveRecord::Base::Class有什么解决方案吗?
发布于 2009-09-07 15:18:58
你包括authlogic main-gem了吗?
也许这对你有帮助:
http://github.com/tsechingho/authlogic_bundle/issues/unreads#issue/3
发布于 2010-04-20 17:10:12
在rails 3.0.0.beta3上的authlogic-openid上也存在同样的问题
修复自:http://futureadapter.com/2009/11/13/authlogic-plugin-errorfix/
这段代码应该在这个文件中(粘贴了我的路径):~/.rvm/gems/ruby-1.9.1-p378/gems/authlogic-oid-1.0.4/lib/authlogic_openid.rb
代码:
if ActiveRecord::Base.respond_to?(:add_acts_as_authentic_module)
ActiveRecord::Base.send(:include, AuthlogicOpenid::ActsAsAuthentic)
Authlogic::Session::Base.send(:include, AuthlogicOpenid::Session)
end发布于 2010-08-24 22:45:41
我也遇到过同样的问题,但当我删除了Authlogic的插件版本并通过environment.rb将gem包含进来时,这个问题就解决了。
https://stackoverflow.com/questions/1389802
复制相似问题