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. poj1006 生理周期

    生理周期 Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 138947   Accepted: 44597 Descripti ...

  2. 图片虚拟目录--即图片保存在window硬盘上面

    这个是图片保存在电脑的硬盘上面的图片上传设置,既不是在web工程中,也不是在专门的图片服务器中,下面是配置方法: r 这里的Document base 我们这里设置为F:\images 如果在浏览器访 ...

  3. echarts 分组绘制柱状图

    示意图: 代码如下: <!DOCTYPE html> <html style="height: 100%"> <head> <meta c ...

  4. nova-conductor与AMQP(二)

    源码版本:H版 一.首先看服务的启动脚本 /usr/bin/nova-conductor import sys from nova.cmd.conductor import main if __nam ...

  5. CF745 C 并查集

    并查集由于政府不能连通我们可以先按给出的边建立连通块,再将不含有政府的点全部作为一个连通块,边数为(n-1)*n/2然后 贪心地将该连通块与[含政府的.且包含点数最多的]连通块相连,然后由于新增了一些 ...

  6. Python学习笔记(三十一)正则表达式

    ---恢复内容开始--- 摘抄自:https://www.liaoxuefeng.com/wiki/0014316089557264a6b348958f449949df42a6d3a2e542c000 ...

  7. js、php本周第一天和本周最后一天

    PHP:本周一 echo date('Y-m-d',(time()-((date('w')==0?7:date('w'))-1)*24*3600)); //w为星期几的数字形式,这里0为周日 本周日 ...

  8. [BZOJ 3039&洛谷P4147]玉蟾宫 题解(单调栈)

    [BZOJ 3039&洛谷P4147]玉蟾宫 Description 有一天,小猫rainbow和freda来到了湘西张家界的天门山玉蟾宫,玉蟾宫宫主蓝兔盛情地款待了它们,并赐予它们一片土地. ...

  9. ue4 TimeRemaining(ratio)找不到的问题

    最近看ue4的Blueprint 3rd Person Game的教学视频,其中第十集https://docs.unrealengine.com/latest/INT/Videos/PLZlv_N0_ ...

  10. NYOJ 1012 RMQ with Shifts (线段树)

    题目链接 In the traditional RMQ (Range Minimum Query) problem, we have a static array A. Then for each q ...