Rails 插件:未定义方法“mattr_accessor”对于哨兵:模块
我正在查看现有的 Rails 项目,并尝试通过运行 rake -T 来查看存在哪些 rake 任务。但是,当我运行时,我得到:
(in /var/www/project)
rake aborted!
undefined method `mattr_accessor' for Sentry:Module
/var/www/project/Rakefile:10
(See full trace by running task with --trace)
vendor/plugins/sentry/tasks/sentry.rake
中没有任何名为 mattr_accessor
的内容。这个错误信息指的是什么?
I'm looking at an existing Rails project and trying to see what rake tasks exist by running rake -T
. However, when I run that I get:
(in /var/www/project)
rake aborted!
undefined method `mattr_accessor' for Sentry:Module
/var/www/project/Rakefile:10
(See full trace by running task with --trace)
vendor/plugins/sentry/tasks/sentry.rake
has nothing called mattr_accessor
in it. What is this error message referring to?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
(通过使用 --trace 运行任务来查看完整跟踪)
您是否尝试使用 --trace 选项运行 rake 命令?
(See full trace by running task with --trace)
Did you try running the rake command with the --trace option?
恐怕当我正在处理其他问题时,这个问题就会自行解决。我不确定问题到底是什么,但我相信这与插件和宝石的过时/冲突版本有关。
I'm afraid this resolved itself while I was working on other issues. I'm not sure exactly what the problem was, but I believe it had to do with outdated/conflicting versions of plugins and gems.