RuntimeError(您想完成 2 帧,但堆栈大小在 rails_admin 中只有 <number>

RuntimeError (You want to finish 2 frames, but stack size is only <number> in rails_admin

我正在使用 rails_admin gem 并且出现以下错误。

RuntimeError (You want to finish 2 frames, but stack size is only -97): lib/rails_admin/recalculate_charges.rb:33:in `block (2 levels) in '

RuntimeError (You want to finish 2 frames, but stack size is only -97): lib/rails_admin/recalculate_charges.rb:33:in `block (2 levels) in '

Rendered /home/vagrant/.rvm/gems/ruby-2.1.1@commeasure_reports/gems/actionpack-4.2.1/lib/action_dispatch/middleware/templates/rescues/_source.erb (85.2ms) Rendered /home/vagrant/.rvm/gems/ruby-2.1.1@commeasure_reports/gems/actionpack-4.2.1/lib/action_dispatch/middleware/templates/rescues/_source.erb (85.2ms) Rendered /home/vagrant/.rvm/gems/ruby-2.1.1@commeasure_reports/gems/actionpack-4.2.1/lib/action_dispatch/middleware/templates/rescues/_trace.text.erb (2.0ms) Rendered /home/vagrant/.rvm/gems/ruby-2.1.1@commeasure_reports/gems/actionpack-4.2.1/lib/action_dispatch/middleware/templates/rescues/_trace.text.erb (2.0ms) Rendered /home/vagrant/.rvm/gems/ruby-2.1.1@commeasure_reports/gems/actionpack-4.2.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.text.erb (2.0ms) Rendered /home/vagrant/.rvm/gems/ruby-2.1.1@commeasure_reports/gems/actionpack-4.2.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.text.erb (2.0ms) Rendered /home/vagrant/.rvm/gems/ruby-2.1.1@commeasure_reports/gems/actionpack-4.2.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.text.erb (103.3ms) Rendered /home/vagrant/.rvm/gems/ruby-2.1.1@commeasure_reports/gems/actionpack-4.2.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.text.erb (103.3ms)

我正在调用一个 ajax 调用,它会收集一些 ID 并将其传递给自定义操作

$(".recalculate-bulk-charges").click(function(e){
      e.preventDefault();
      var booking_report_ids = []
      $(".booking_report_row input:checkbox:checked").map(function(){
        if (parseInt($(this).val()) != NaN) {
          booking_report_ids.push(parseInt($(this).val()));
        }
      });
      $.get("url", {"br_ids[]": booking_report_ids}).done(function(){
        window.location = "url";
      })
    }) 

当我重新启动服务器时,错误没有再次出现。请帮助我。

我在自定义操作中使用了 byebug。由于 byebug

,它给出了错误

此问题似乎已被 ruby 2.1.5 或更高版本的最新 byebug 修复:https://github.com/deivid-rodriguez/byebug/issues/127。尝试升级 byebug 和 ruby.