为什么ActiveAdmin文件出现在Rails日志中,每个请求?

时间:2012-04-17 19:44:33

标签: ruby-on-rails-3 activeadmin logging

我找不到问题的根源。

我正在使用Rails 3.1.1和ActiveAdmin 0.4.0。 Web服务器是WEBrick 1.3.1。

每个请求,ActiveAdmin文件都显示在日志中。例如:

Started GET "/admin/" for 127.0.0.1 at 2012-04-17 21:28:37 +0200
[nil, ["path/to/the/app/admin", "path/to/the/app/admin/modela.rb", "path/to/the/app/admin/modelb.rb", "path/to/the/app/admin/modelc.rb", "path/to/the/app/admin/modeld.rb", "path/to/the/app/admin/modele.rb", "path/to/the/app/admin/modelf.rb", "path/to/the/app/admin/modelg.rb", "path/to/the/app/admin/modelh.rb", "path/to/the/app/admin/modeli.rb"]]
  Processing by Admin::DashboardController#index as HTML
Completed 401 Unauthorized in 7ms

app / admin / dashboards.rb:

ActiveAdmin::Dashboards.build do
end

无论页面如何,ActiveAdmin文件都会显示在日志中...... 无论环境(开发,分期,生产......)

另一页,另一个例子:

[...]

Started GET "/assets/jquery-1.7.1.min.js?body=1" for 127.0.0.1 at 2012-04-18 12:37:40 +0200
[nil, ["path/to/the/app/admin", "path/to/the/app/admin/modela.rb", "path/to/the/app/admin/modelb.rb", "path/to/the/app/admin/modelc.rb", "path/to/the/app/admin/modeld.rb", "path/to/the/app/admin/modele.rb", "path/to/the/app/admin/modelf.rb", "path/to/the/app/admin/modelg.rb", "path/to/the/app/admin/modelh.rb", "path/to/the/app/admin/modeli.rb"]]
Served asset /jquery-1.7.1.min.js - 304 Not Modified (0ms)


Started GET "/assets/jquery.ui.datepicker-fr.js?body=1" for 127.0.0.1 at 2012-04-18 12:37:40 +0200
[nil, ["path/to/the/app/admin", "path/to/the/app/admin/modela.rb", "path/to/the/app/admin/modelb.rb", "path/to/the/app/admin/modelc.rb", "path/to/the/app/admin/modeld.rb", "path/to/the/app/admin/modele.rb", "path/to/the/app/admin/modelf.rb", "path/to/the/app/admin/modelg.rb", "path/to/the/app/admin/modelh.rb", "path/to/the/app/admin/modeli.rb"]]
Served asset /jquery.ui.datepicker-fr.js - 304 Not Modified (0ms)


Started GET "/assets/jquery_ujs.js?body=1" for 127.0.0.1 at 2012-04-18 12:37:40 +0200
[nil, ["path/to/the/app/admin", "path/to/the/app/admin/modela.rb", "path/to/the/app/admin/modelb.rb", "path/to/the/app/admin/modelc.rb", "path/to/the/app/admin/modeld.rb", "path/to/the/app/admin/modele.rb", "path/to/the/app/admin/modelf.rb", "path/to/the/app/admin/modelg.rb", "path/to/the/app/admin/modelh.rb", "path/to/the/app/admin/modeli.rb"]]
Served asset /jquery_ujs.js - 304 Not Modified (0ms)

[...]

请参阅每个请求中的内容:

[nil, ["path/to/the/app/admin", "path/to/the/app/admin/modela.rb", "path/to/the/app/admin/modelb.rb", "path/to/the/app/admin/modelc.rb", "path/to/the/app/admin/modeld.rb", "path/to/the/app/admin/modele.rb", "path/to/the/app/admin/modelf.rb", "path/to/the/app/admin/modelg.rb", "path/to/the/app/admin/modelh.rb", "path/to/the/app/admin/modeli.rb"]]

有什么想法吗?

2 个答案:

答案 0 :(得分:0)

看起来可能会在堆栈中的某个位置打开调试。

如果不进一步盲目调试,您能否提供有关此问题的更多信息 - 例如:

  • 您安装了哪个版本的Rails
  • 您安装了哪个版本的ActiveAdmin
  • Admin :: DashboardController代码

答案 1 :(得分:0)

看来这是来自AA团队的“调试线”。请参阅:https://github.com/gregbell/active_admin/pull/952

在此提交中,sferik删除了它: https://github.com/sferik/active_admin/commit/8bec274d4d0f3d5592c27c18ab8332b555ff8102