`method_missing':安装设备时未定义的局部变量或方法`authentication_keys'错误

时间:2011-03-29 02:21:35

标签: ruby-on-rails rubygems devise

我正在尝试让Devise运行起来。我正在使用设计1.0.10和rails 2.3.8,在一个非常干净的hostrails安装。

当我运行ruby script/generate devise_install

我收到以下错误消息。谁看过这个吗。任何想法如何进行安装?我四处搜寻并撞墙。

谢谢,蒂姆

ruby​​脚本/生成devise_install /home/p7017r10/appname/config/environment.rb:4:警告:已初始化常量RAILS_ENV /usr/local/rvm/gems/ruby-1.8.6-p369/gems/activerecord-2.3.8/lib/active_record/base.rb:1994:in method_missing': undefined local variable or method authentication_keys'for#(NameError)     来自/usr/local/rvm/gems/ruby-1.8.6-p369/gems/devise-1.0.5/lib/devise/models/validatable.rb:18:in included' from /usr/local/rvm/gems/ruby-1.8.6-p369/gems/devise-1.0.5/lib/devise/models/validatable.rb:16:in class_eval'     来自/usr/local/rvm/gems/ruby-1.8.6-p369/gems/devise-1.0.5/lib/devise/models/validatable.rb:16:in included' from /usr/local/rvm/gems/ruby-1.8.6-p369/gems/devise-1.0.5/lib/devise/models.rb:66:in include'     来自/usr/local/rvm/gems/ruby-1.8.6-p369/gems/devise-1.0.5/lib/devise/models.rb:66:in devise' from /usr/local/rvm/gems/ruby-1.8.6-p369/gems/devise-1.0.5/lib/devise/models.rb:65:in每个'     来自/usr/local/rvm/gems/ruby-1.8.6-p369/gems/devise-1.0.5/lib/devise/models.rb:65:in devise' from /usr/local/rvm/gems/ruby-1.8.6-p369/gems/devise-1.0.5/lib/devise/orm/active_record.rb:24:in included_modules_hook'      ...... 37级......     来自/usr/local/rvm/gems/ruby-1.8.6-p369/gems/rails-2.3.8/lib/commands/generate.rb:1     来自/usr/local/rvm/rubies/ruby-1.8.6-p369/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' from /usr/local/rvm/rubies/ruby-1.8.6-p369/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in require'     来自script / generate:3

2 个答案:

答案 0 :(得分:0)

检查google groups上的设备组

http://groups.google.com/group/plataformatec-devise

这是提出这个问题的更好的论坛

答案 1 :(得分:0)

我猜你应该查看initializers / devise.rb。有一些关于设置这些键的说明。另外,请参阅http://asciicasts.com/episodes/210-customizing-devisehttp://blog.plataformatec.com.br/tag/subdomain/

我没有使用RoR 2.3.x的设计,仅使用3.0.x.这可能是不同的。

希望有所帮助。让我们知道:))