【IT专家】在Rails 3中运行错误提示

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

本文由我司收集整编,推荐下载,如有疑问,请与我司联系
在Rails 3 中运行错误提示
2011/02/07 524 I followed the gem installation steps on https://github/brady8/thumbs_up but ran into an error when following the usage steps.
我在https://github/brady8/thumbs_up 上执行了gem 安装步骤,但是在执行使用步
骤时遇到了错误。

This is taken from my User and Comment models:
这是从我的用户和评论模型:
class User ActiveRecord::Base some devise specific stuff
acts_as_voterclass
Comment ActiveRecord::Base acts_as_voteable The error I’m getting is the following:
我得到的错误如下:
C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord- 3.0.3/lib/active_record/base.rb:1008:in ‘method_missing’Exiting : undefined local variable or method ‘acts_as_voter’ for # (NameError)
C:/ Ruby192 / lib / ruby /珠宝/ 1.9.1 /珠宝/ activerecord-3.0.3 / lib / active_record /基地。

rb:1008:在‘method_missing’中退出:未定义的局部变量或方法为# (NameError)
的‘acts_as_voter’
Removing the acts_as_voter line in User model eliminates the problem even though there is an ‘acts_as_voteable’ in the Comment model which seems to work fine then.
在用户模型中删除acts_as_投票者行可以消除这个问题,尽管在评论模型中有一
个“acts_as_voteable”,但它看起来运行良好。

Any ideas?
什么好主意吗?
3
I had the same issue after adding the thumbs_up gem to my application.
在向应用程序中添加了thumbs_up gem 之后,我遇到了同样的问题。

Restarting the server cleared it up for me.。

相关文档
最新文档