小编Chr*_*ris的帖子

Rails 3 Authlogic - 'acts_as_authentic'未定义

我收到以下错误:

NameError (undefined local variable or method `acts_as_authentic' for #<Class:0x1037e6310>):
  app/models/user.rb:2
  app/controllers/user_controller.rb:3:in `new'
Run Code Online (Sandbox Code Playgroud)

我正在使用Rails 3.0.0,Ruby 1.8.7.Authlogic在我的Gemfile中如下:

gem 'authlogic', :git => "git://github.com/binarylogic/authlogic.git"
Run Code Online (Sandbox Code Playgroud)

我的User.rb文件的全部内容如下:

class User < ActiveRecord::Base
   acts_as_authentic 
end
Run Code Online (Sandbox Code Playgroud)

无论是通过'rails console'还是通过服务器,我都会得到同样的错误.我已经重启了服务器的次数超过了我的数量.请帮忙,我无法弄清楚.

ruby authlogic ruby-on-rails-3

5
推荐指数
1
解决办法
2040
查看次数

标签 统计

authlogic ×1

ruby ×1

ruby-on-rails-3 ×1