Rails Rabl宝石没有显示行号

时间:2013-05-29 14:54:47

标签: ruby-on-rails-3 rabl

每当rabl模板中的渲染失败时,它只会显示错误。它不显示行号。还有人遇到过这个问题吗?

示例跟踪

Rendered campaigns/show.json.rabl (1377.9ms)  
undefined method `[]' for nil:NilClass  
(eval):21:in `block (2 levels) in render'  
/Users/pkhadloya/.rbenv/versions/1.9.3-p392/gemsets/myapp/gems/rabl-0.8.5/lib/rabl/builder.rb:87:in `call'  
/Users/pkhadloya/.rbenv/versions/1.9.3-p392/gemsets/myapp/gems/rabl-0.8.5/lib/rabl/builder.rb:87:in `node'

1 个答案:

答案 0 :(得分:1)

获得了这个有用的链接:http://davidsommers.com/2012/07/28/use-the-debugger-not-puts.html 它显示了如何在rabl中调试。但是行号会更有益。