Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/firebase/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 我怎样才能让Rails提供关于错误it';那不是日志记录吗?_Ruby On Rails_Ruby_Stack Trace - Fatal编程技术网

Ruby on rails 我怎样才能让Rails提供关于错误it';那不是日志记录吗?

Ruby on rails 我怎样才能让Rails提供关于错误it';那不是日志记录吗?,ruby-on-rails,ruby,stack-trace,Ruby On Rails,Ruby,Stack Trace,这一直困扰着我:Rails在渲染完我的视图之后,但在返回到浏览器之前抛出了这个错误: ActionView::Template::Error (undefined method `start_with?' for #<Proc:0x00005651bfe017f0>) ActionView::Template::Error(未定义的方法'start_with') 而且。。。就这样。没有堆栈跟踪。尽管设置了config.consived\u all\u requests\u loc

这一直困扰着我:Rails在渲染完我的视图之后,但在返回到浏览器之前抛出了这个错误:

ActionView::Template::Error (undefined method `start_with?' for #<Proc:0x00005651bfe017f0>)
ActionView::Template::Error(未定义的方法'start_with')
而且。。。就这样。没有堆栈跟踪。尽管设置了
config.consived\u all\u requests\u local=true
,我还是看到了标准的500“我们很抱歉,但出了问题”页面。终端或
log/development.log
中没有进一步的详细信息

我找不到它可能抱怨的任何程序,也找不到任何调用
start\u with?
的可能原因;我回顾了Git的历史,并将问题隔离到一个提交中(如果您想详细查看的话),但该提交中没有任何明显的内容

调用
呈现布局:false
确实有效,将我的
布局/application.js
简化为一个
,这让我觉得它可能在那里,但是-在出现问题的提交中,我没有对它或任何视图进行任何更改


我真正想知道的是如何让Rails给我这个错误的堆栈跟踪,这样我就可以找出它的来源。如果您对bug本身的位置有任何想法,也非常欢迎。

将其放入初始值设定项(proc.rb):

class Proc
  def start_with?(*args)
    puts caller  
  end 
end