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. windows下php扩展存在但无法加载的问题

    1.可能存在多个php环境,扩展没有放对地方 2.扩展和php版本不对应,例如,php是32位,扩展是64位:或者php是nts版本,但是扩展不是nts版本.

  2. OpenResty初涉

    关于openresty可参考官方文档: http://openresty.org/cn/download.html 1.这个是什么? 在互联网公司,Nginx可以说是标配组件,但是主要场景还是负载均衡 ...

  3. apk文件签名绕过

    声明: 1.本文转载自:http://www.2cto.com/Article/201311/256406.html,为了留作日后参考上传博客 2.如有转载请复试上面连接,尊重原创 apk文件签名绕过 ...

  4. Android_UiAutomator(安卓UI自动化)环境搭建

    一.配置JDK环境变量 1.新建系统变量JAVA_HOME,然后输入引号内的内容(JDK安装目录) "C:\Program Files\Java\jdk1.8.0_51"      ...

  5. spring整合hibernate时报错:org.hibernte.engine.transaction.spi.transactioncontext

    错误提示:Caused by:java.lang.ClassNotFoundException: org.hibernte.engine.transaction.spi.transactioncont ...

  6. (转) 使用vivado创建工程 4[完结]

    由于自己手头暂时没有开发板,因此本节没有测试,故告之. Connecting to ZedBoardBefore we can run the application we have to conne ...

  7. ios 字符串截取

    NSString *str = @"my name is jiemu"; 1.从第三个字符开始,截取长度为4的字符串 NSString *str2 = [str substring ...

  8. linux下开放端口

    /sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT 将该设置添加到防火墙的规则中 /etc/rc.d/init.d/iptables save

  9. C语言中的序列点

    TAG: C, 序列点 DATE: 2013-08-07 序列点是程序执行序列中一些特殊的点. 当有序列点存在时,序列点前面的表达式必须求值完毕,并且副作用也已经发生, 才会计算序列点后面的表达式和其 ...

  10. LintCode 508: Wiggle Sort

    LintCode 508: Wiggle Sort 题目描述 给你一个没有排序的数组,请将原数组就地重新排列满足如下性质 nums[0] <= nums[1] >= nums[2] < ...