snorby 2.6.2 undefined method `run_daily_report' for Event:Class (NoMethodError)

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

错误及原因解释:

[[email protected] 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

来源: <https://groups.google.com/forum/#!topic/snorby/74UoEzER3hA>

snorby 2.6.2 undefined method `run_daily_report' for Event:Class (NoMethodError)

时间: 2024-12-15 00:48:51

snorby 2.6.2 undefined method `run_daily_report' for Event:Class (NoMethodError)的相关文章

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(NomethodError) 找了很多网上的资料也不行,最后无意中解决掉了...由于我用的是sourceTree工具,可能是不小心更改了设置,把类型弄成了其它,不是git了,导致代码push不成功 Git Push问题remote: hooks/update:10 undefined method 're

ruby on rails错误undefined method `title&#39; for nil:NilClass

首先搞清楚这句话,在 Ruby 中,方法分为 public.private 和 protected 三种,只有 public 方法才能作为控制器的动作. 我的出错的代码如下: controlle class ArticlesController < ApplicationController def new end def create params.permit! @article = Article.new(params[:article]) @article.save redirect_t

&quot;undefined method `root&#39; for nil:NilClass&quot; error when using &quot;pod install&quot; 解决办法

如果pod undate 的时候报错"undefined method `root' for nil:NilClass" error when using "pod install" 或 NoMethodError - undefined method `dirname' for nil:NilClass 检查你的podfile文件 保证一下信息存在 Pod::Spec.new do |s| s.name = "DDEBusiness" s.ve

ruby on rails错误undefined method `title&amp;#39; for nil:NilClass

首先搞清楚这句话,在 Ruby 中,方法分为 public.private 和 protected 三种,仅仅有 public 方法才干作为控制器的动作. 我的出错的代码例如以下: controlle class ArticlesController < ApplicationController def new end def create params.permit! @article = Article.new(params[:article]) @article.save redirec

Laravel笔记之Call to undefined method DebugBar\DebugBar::warning()

使用Laravel Debugbar (Integrates PHP Debug Bar)调试信息报错. Debugbar::warning('Watch out…'); 报错信息如下: Call to undefined method DebugBar\DebugBar::warning() phpStorm工具只能导入包,在导入DebugBar的时候出的问题,导入的是其他的DebugBar的包,所以错误.将命名空间改成: use Barryvdh\Debugbar\Facade as Deb

rails中render 和 redirect_to的区别, each只能用在数组中,如果只有一个或者零个项,用each方法会报错undefined method `each&#39; for #...

在render中,即使有:action,那么也仅仅是取对应的view中的模板(html.erb)而已,所以这里即使浏览器中的url是/orders/xcreate,但是显示的界面是/app/views/orders/xshow的代码 def xcreate flash.now[:notice] = "bb" @order = Order.new(params[:order]) if @order.save flash[:notice] = "yes" render(

undefined method `environment&#39; for nil:NilClass when importing Bootstrap into rails

今天做项目时往Gemfile里加了各gem, 然后bundle update了一下, 然后悲剧了,出现了undefined method `environment' for nil:NilClass when importing Bootstrap into rails错误, 各种不理解. 然后查了一下, 找到了解决方案: https://stackoverflow.com/questions/22392862/undefined-method-environment-for-nilnilcla

Composer环境混乱引起--Fatal error: Call to undefined method Fxp

Fatal error: Call to undefined method Fxp\Composer\AssetPlugin\Package\Version\V ersionParser::parseLinks() in C:\Documents and Settings\Administrator\Applicatio n Data\Composer\vendor\fxp\composer-asset-plugin\Repository\VcsPackageFilter.php on line

rails undefined method error_messages

学习了:http://stackoverflow.com/questions/10002140/use-error-messages-in-rails-3-2-raises-undefined-method-error <%= form_for [@camp, @program] do |f| %> <% @program.errors.full_messages.each do |msg| %> <p><%= msg %></p> <%