rails runner "Event.run_daily_report"测试邮件配置undefined method `run_daily_report' for Event:Class (NoMethodError)
 
原因是:snorby2.6.1开始移除了DailyCacheJob,因此需要更换测试方式
 
新的测试方式:rails r ReportMailer.daily_report.deliver
 

源自:https://github.com/Snorby/snorby/issues/73

 
错误及原因解释:
 
[root@IPS script]# rails runner "Event.run_daily_report"
Jammit Warning: Asset compression disabled -- Java unavailable.
/usr/local/rvm/gems/ruby-1.9.3-p551/gems/railties-3.1.12/lib/rails/commands/runner.rb:49:in `eval': undefined method `run_daily_report' for Event:Class (NoMethodError)
from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/dm-core-1.2.0/lib/dm-core/model/relationship.rb:372:in `method_missing'
from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/dm-core-1.2.0/lib/dm-core/model/property.rb:249:in `method_missing'
from (eval):1:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/railties-3.1.12/lib/rails/commands/runner.rb:49:in `eval'
from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/railties-3.1.12/lib/rails/commands/runner.rb:49:in `<top (required)>'
from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/railties-3.1.12/lib/rails/commands.rb:63:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p551/gems/railties-3.1.12/lib/rails/commands.rb:63:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
 

 
Hey Doug,

 
The DailyCacheJob was remove in 2.6.1. Since we added the ability for user to change their timezone we had to remove the cache roll up that depended on day start/end (the daily cache job). The sensor cache job however is done every 10 mins so it;s easy to build a proper cache for the day based off of that data.
 
- Dustin

Dustin Willis Webber
 
 

开源IDS系列--snorby 2.6.2 undefined method `run_daily_report' for Event:Class (NoMethodError)的更多相关文章

  1. 开源IDS系列--snorby 进程正常,但是worker无法启动 The Snorby worker is not currently running

    设置页面报错:   The Snorby worker is not currently running. It's imperative you start the worker immediate ...

  2. 开源IDS系列--解决barnyard2 停止运行 libmysqlclient.so.16.0.0

    现象: barnyard2运行一段时间后,会自行停止,未在/var/log/barnyard2或/var/log/suricata中发现相关日志. 排查: 在/var/log/message中存在以下 ...

  3. 开源IDS系列--【2015】获取snort vrt 规则(talo)

    1.在snort网站注册 2.注册成功后,会在个人信息中生成:Oinkcode 3.https://www.snort.org/rules/snortrules-snapshot-2973.tar.g ...

  4. gem安装时出现 undefined method `size' for nil:NilClass (NoMethodError) 的解决办法

    终端输入gem env 得到gem的PATH路径,比如 - GEM PATHS: - /usr/local/ruby/lib/ruby/gems/2.1.0 - /home/vagrant/.gem/ ...

  5. Git Push问题remote: hooks/update:10 undefined method &#39;require_relative&#39; for main:Object(NomethodError)

    今天在提交代码时遇到到了一个非常蛋疼的问题,remote: hooks/update:10 undefined method 'require_relative' for main:Object(No ...

  6. Suricata开源IDS安装与配置

    开源IDS Suricata安装 Linux下的依赖问题的解决 在Debian,Ubuntu或者Linux Mint系列 $ sudo apt-get install wget build-essen ...

  7. Suricata+Barnyard2+Base的IDS前端Snorby

    搭建基于Suricata+Barnyard2+Base的IDS前端Snorby 4.Barnyard2:http://www.securixlive.com/barnyard2/download.ph ...

  8. Urule开源版系列5——RuleSetParser解析过程

    接上期Urule开源版系列4--Core包核心接口之规则解析过程 之前源码到了Parser,这期详细解析下RuleSetParser的解析过程 1.主流程 特殊处理一个属性 循环处理元素 当元素名称是 ...

  9. undefined method `environment' for nil:NilClass when importing Bootstrap into rails

    今天做项目时往Gemfile里加了各gem, 然后bundle update了一下, 然后悲剧了,出现了undefined method `environment' for nil:NilClass ...

随机推荐

  1. 「Linux」centos7安装python

    •安装python3.6可能使用的依赖 yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqli ...

  2. Turkey HSD检验法/W法

    sklearn实战-乳腺癌细胞数据挖掘(博主亲自录视频) https://study.163.com/course/introduction.htm?courseId=1005269003&u ...

  3. Tensorflow实现学习率衰减

    Tensorflow实现学习率衰减 觉得有用的话,欢迎一起讨论相互学习~Follow Me 参考文献 Deeplearning AI Andrew Ng Tensorflow1.2 API 学习率衰减 ...

  4. 主席树 或者 离散化+分块 BZOJ 4636

    4636: 蒟蒻的数列 Time Limit: 30 Sec  Memory Limit: 256 MBSubmit: 381  Solved: 177[Submit][Status][Discuss ...

  5. MongoDB - MongoDB CRUD Operations, Update Documents

    Update Methods MongoDB provides the following methods for updating documents in a collection: Method ...

  6. java用于控制可见性的4个访问修饰符

    仅对本类可见——private 对所有类可见——public 对本包的所有子类可见——protected 对本包可见——默认(很遗憾)不需要修饰符

  7. spring 添加controller返回值绑定

    @EnableWebMvc @Configuration public class Config { @Autowired private RequestMappingHandlerAdapter h ...

  8. 当月第一天、最后一天、下月第一天,时间date

    时间记录,不是时间戳 $thismonth = date('m'); $thisyear = date('Y'); $startDay = $thisyear . '-' . $thismonth . ...

  9. 阿里云 配置FTP 无法连接问题,2017年7月后

    被阿里云坑飞,2017年7月上线的安全组,我压根不知道 新服务器 配置防火墙后怎么也不起作用,也暂时关不了防火墙 iptables stop #无效 搞了半天 才知道TM  不需要在linx服务器上自 ...

  10. 关于parse_str变量覆盖分析

    这个漏洞有两个姿势.一个是不存在的时候一个是存在的时候. 经过测试该漏洞只在php5.2中存在,其余均不存在. 倘若在parse_str函数使用的代码上方未将其定义那么即存在变量覆盖漏洞否则不行. 还 ...