我的 Rails 3 应用程序中的 Metric-fu 无法运行

发布于 2024-10-05 04:43:58 字数 13599 浏览 3 评论 0原文

通过将其放入我的 Gemfile 中,在 Rails 3 应用程序中安装了 metric-fu。但是当我运行 rake 任务时它失败了。以下错误,有人知道如何解决这个问题吗?

$ rake metrics:all --trace
(in /home/pma/Documents/boss-mocha)
** Invoke metrics:all (first_time)
** Execute metrics:all
  parse error on value ")" (tRPAREN)
  skipping app/views/software_projects/_form.html.erb
  parse error on value ")" (tRPAREN)
  skipping app/views/instruction_items/_form.html.erb
  parse error on value ")" (tRPAREN)
  skipping app/views/companies/_form.html.erb
  parse error on value ")" (tRPAREN)
  skipping app/views/instructions/_form.html.erb
  parse error on value ")" (tRPAREN)
  skipping app/views/company_groups/_form.html.erb
  parse error on value ")" (tRPAREN)
  skipping app/views/replies/_form.html.erb
  parse error on value ")" (tRPAREN)
  skipping app/views/replies/edit.html.erb
  parse error on value ")" (tRPAREN)
  skipping app/views/devise/unlocks/new.html.erb
  parse error on value ")" (tRPAREN)
  skipping app/views/devise/registrations/new.html.erb
  parse error on value ")" (tRPAREN)
  skipping app/views/devise/registrations/edit.html.erb
  parse error on value ")" (tRPAREN)
  skipping app/views/devise/confirmations/new.html.erb
  parse error on value ")" (tRPAREN)
  skipping app/views/devise/passwords/new.html.erb
  parse error on value ")" (tRPAREN)
  skipping app/views/devise/passwords/edit.html.erb
  parse error on value ";" (tSEMI)
  skipping app/views/devise/shared/_links.erb
  parse error on value ")" (tRPAREN)
  skipping app/views/devise/sessions/new.html.erb
** Running the specs/tests in the [test] environment
saikuro --error_cyclo 7 --output_directory tmp/metric_fu/scratch/saikuro --formater text --input_directory app lib --cyclo  --filter_cyclo 0 --warn_cyclo 5 --input_directory app --input_directory lib 
Parsing app/views/ui/dashboard_panel.html.erb
Parsing app/views/ui/dashboard.html.erb
Parsing app/views/ui/index.html.erb
Parsing app/views/ui/left_menu.html.erb
Parsing app/views/ui/dashboard_panel.js.erb
Parsing app/views/devise/sessions/new.html.erb
Parsing app/views/devise/shared/_links.erb
Parsing app/views/devise/shared/_custom_user_fields.html.erb
Parsing app/views/devise/passwords/edit.html.erb
Parsing app/views/devise/passwords/new.html.erb
Parsing app/views/devise/confirmations/new.html.erb
Parsing app/views/devise/mailer/unlock_instructions.html.erb
Parsing app/views/devise/mailer/confirmation_instructions.html.erb
Parsing app/views/devise/mailer/reset_password_instructions.html.erb
Parsing app/views/devise/registrations/edit.html.erb
Parsing app/views/devise/registrations/new.html.erb
Parsing app/views/devise/unlocks/new.html.erb
Parsing app/views/employee_leaves/.componentsMenu.html.erb
Parsing app/views/employee_leaves/.folder.html.erb
Parsing app/views/employee_leaves/new.html.erb
Parsing app/views/employee_leaves/index.html.erb
Parsing app/views/users/contract.html.erb
Parsing app/views/users/leave.html.erb
Parsing app/views/users/attendance.html.erb
Parsing app/views/users/show.html.erb
Parsing app/views/users/index.html.erb
Parsing app/views/users/tabs.html.erb
Parsing app/views/users/history.html.erb
Lexer received an error for line 5 char 2
Parsing app/views/statistics/index.html.erb
Parsing app/views/layouts/application.html.erb
Parsing app/views/recruitment/index.html.erb
Parsing app/views/replies/update.js.erb
Parsing app/views/replies/edit.html.erb
Parsing app/views/replies/create.js.erb
Parsing app/views/replies/_form.html.erb
Parsing app/views/company_groups/edit.html.erb
Parsing app/views/company_groups/new.html.erb
Parsing app/views/company_groups/show.html.erb
Parsing app/views/company_groups/index.html.erb
Parsing app/views/company_groups/_form.html.erb
Parsing app/views/instructions/_item.html.erb
Parsing app/views/instructions/edit.html.erb
Parsing app/views/instructions/new.html.erb
Parsing app/views/instructions/create.js.erb
Parsing app/views/instructions/show.html.erb
Parsing app/views/instructions/index.html.erb
Parsing app/views/instructions/manage.html.erb
Parsing app/views/instructions/_form.html.erb
Parsing app/views/companies/edit.html.erb
Parsing app/views/companies/new.html.erb
Parsing app/views/companies/show.html.erb
Parsing app/views/companies/index.html.erb
Parsing app/views/companies/_form.html.erb
Parsing app/views/instruction_items/edit.html.erb
Parsing app/views/instruction_items/_reply.html.erb
Parsing app/views/instruction_items/new.html.erb
Parsing app/views/instruction_items/create.js.erb
Parsing app/views/instruction_items/show.html.erb
Parsing app/views/instruction_items/_form.html.erb
Parsing app/views/software_projects/edit.html.erb
Parsing app/views/software_projects/new.html.erb
Parsing app/views/software_projects/show.html.erb
Parsing app/views/software_projects/index.html.erb
Parsing app/views/software_projects/_form.html.erb
Parsing app/controllers/application_controller.rb
Parsing app/controllers/replies_controller.rb
Parsing app/controllers/users_controller.rb
Parsing app/controllers/ui_controller.rb
Parsing app/controllers/statistics_controller.rb
Parsing app/controllers/software_projects_controller.rb
Parsing app/controllers/company_groups_controller.rb
Parsing app/controllers/recruitment_controller.rb
Parsing app/controllers/instruction_items_controller.rb
Parsing app/controllers/employee_leaves_controller.rb
Parsing app/controllers/companies_controller.rb
Parsing app/controllers/instructions_controller.rb
Parsing app/models/instruction_item.rb
Parsing app/models/user.rb
Parsing app/models/reply.rb
Parsing app/models/software_project_test_item.rb
Parsing app/models/instruction.rb
Parsing app/models/company_group.rb
Parsing app/models/employee_leave.rb
Parsing app/models/software_project.rb
Parsing app/models/company.rb
Parsing app/helpers/recruitment_helper.rb
Parsing app/helpers/users_helper.rb
Parsing app/helpers/statistics_helper.rb
Parsing app/helpers/software_projects_helper.rb
Parsing app/helpers/companies_helper.rb
Parsing app/helpers/company_groups_helper.rb
Parsing app/helpers/employee_leaves_helper.rb
Parsing app/helpers/application_helper.rb
Parsing app/views/ui/dashboard_panel.html.erb
Parsing app/views/ui/dashboard.html.erb
Parsing app/views/ui/index.html.erb
Parsing app/views/ui/left_menu.html.erb
Parsing app/views/ui/dashboard_panel.js.erb
Parsing app/views/devise/sessions/new.html.erb
Parsing app/views/devise/shared/_links.erb
Parsing app/views/devise/shared/_custom_user_fields.html.erb
Parsing app/views/devise/passwords/edit.html.erb
Parsing app/views/devise/passwords/new.html.erb
Parsing app/views/devise/confirmations/new.html.erb
Parsing app/views/devise/mailer/unlock_instructions.html.erb
Parsing app/views/devise/mailer/confirmation_instructions.html.erb
Parsing app/views/devise/mailer/reset_password_instructions.html.erb
Parsing app/views/devise/registrations/edit.html.erb
Parsing app/views/devise/registrations/new.html.erb
Parsing app/views/devise/unlocks/new.html.erb
Parsing app/views/employee_leaves/.componentsMenu.html.erb
Parsing app/views/employee_leaves/.folder.html.erb
Parsing app/views/employee_leaves/new.html.erb
Parsing app/views/employee_leaves/index.html.erb
Parsing app/views/users/contract.html.erb
Parsing app/views/users/leave.html.erb
Parsing app/views/users/attendance.html.erb
Parsing app/views/users/show.html.erb
Parsing app/views/users/index.html.erb
Parsing app/views/users/tabs.html.erb
Parsing app/views/users/history.html.erb
Lexer received an error for line 5 char 2
Parsing app/views/statistics/index.html.erb
Parsing app/views/layouts/application.html.erb
Parsing app/views/recruitment/index.html.erb
Parsing app/views/replies/update.js.erb
Parsing app/views/replies/edit.html.erb
Parsing app/views/replies/create.js.erb
Parsing app/views/replies/_form.html.erb
Parsing app/views/company_groups/edit.html.erb
Parsing app/views/company_groups/new.html.erb
Parsing app/views/company_groups/show.html.erb
Parsing app/views/company_groups/index.html.erb
Parsing app/views/company_groups/_form.html.erb
Parsing app/views/instructions/_item.html.erb
Parsing app/views/instructions/edit.html.erb
Parsing app/views/instructions/new.html.erb
Parsing app/views/instructions/create.js.erb
Parsing app/views/instructions/show.html.erb
Parsing app/views/instructions/index.html.erb
Parsing app/views/instructions/manage.html.erb
Parsing app/views/instructions/_form.html.erb
Parsing app/views/companies/edit.html.erb
Parsing app/views/companies/new.html.erb
Parsing app/views/companies/show.html.erb
Parsing app/views/companies/index.html.erb
Parsing app/views/companies/_form.html.erb
Parsing app/views/instruction_items/edit.html.erb
Parsing app/views/instruction_items/_reply.html.erb
Parsing app/views/instruction_items/new.html.erb
Parsing app/views/instruction_items/create.js.erb
Parsing app/views/instruction_items/show.html.erb
Parsing app/views/instruction_items/_form.html.erb
Parsing app/views/software_projects/edit.html.erb
Parsing app/views/software_projects/new.html.erb
Parsing app/views/software_projects/show.html.erb
Parsing app/views/software_projects/index.html.erb
Parsing app/views/software_projects/_form.html.erb
Parsing app/controllers/application_controller.rb
Parsing app/controllers/replies_controller.rb
Parsing app/controllers/users_controller.rb
Parsing app/controllers/ui_controller.rb
Parsing app/controllers/statistics_controller.rb
Parsing app/controllers/software_projects_controller.rb
Parsing app/controllers/company_groups_controller.rb
Parsing app/controllers/recruitment_controller.rb
Parsing app/controllers/instruction_items_controller.rb
Parsing app/controllers/employee_leaves_controller.rb
Parsing app/controllers/companies_controller.rb
Parsing app/controllers/instructions_controller.rb
Parsing app/models/instruction_item.rb
Parsing app/models/user.rb
Parsing app/models/reply.rb
Parsing app/models/software_project_test_item.rb
Parsing app/models/instruction.rb
Parsing app/models/company_group.rb
Parsing app/models/employee_leave.rb
Parsing app/models/software_project.rb
Parsing app/models/company.rb
Parsing app/helpers/recruitment_helper.rb
Parsing app/helpers/users_helper.rb
Parsing app/helpers/statistics_helper.rb
Parsing app/helpers/software_projects_helper.rb
Parsing app/helpers/companies_helper.rb
Parsing app/helpers/company_groups_helper.rb
Parsing app/helpers/employee_leaves_helper.rb
Parsing app/helpers/application_helper.rb
rake aborted!
undefined method `chr' for nil:NilClass
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/metric_fu-2.0.1/lib/generators/stats.rb:29:in `remove_noise'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/metric_fu-2.0.1/lib/generators/saikuro.rb:128:in `find_all'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/metric_fu-2.0.1/lib/generators/stats.rb:29:in `each'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/metric_fu-2.0.1/lib/generators/stats.rb:29:in `find_all'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/metric_fu-2.0.1/lib/generators/stats.rb:29:in `remove_noise'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/metric_fu-2.0.1/lib/generators/stats.rb:11:in `analyze'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/metric_fu-2.0.1/lib/base/generator.rb:126:in `send'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/metric_fu-2.0.1/lib/base/generator.rb:126:in `generate_report'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/metric_fu-2.0.1/lib/base/generator.rb:124:in `each'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/metric_fu-2.0.1/lib/base/generator.rb:124:in `generate_report'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/metric_fu-2.0.1/lib/base/generator.rb:52:in `generate_report'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/metric_fu-2.0.1/lib/base/report.rb:54:in `add'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/metric_fu-2.0.1/lib/../tasks/metric_fu.rake:6
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/metric_fu-2.0.1/lib/../tasks/metric_fu.rake:6:in `each'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/metric_fu-2.0.1/lib/../tasks/metric_fu.rake:6
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/home/pma/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/bin/rake:31
/home/pma/.rvm/gems/ree-1.8.7-2010.02/bin/rake:19:in `load'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/bin/rake:19

Installed metric-fu in a Rails 3 app by putting it in my Gemfile. But when I run the rake task it fails. Error below, any idea how to solve this anyone?

$ rake metrics:all --trace
(in /home/pma/Documents/boss-mocha)
** Invoke metrics:all (first_time)
** Execute metrics:all
  parse error on value ")" (tRPAREN)
  skipping app/views/software_projects/_form.html.erb
  parse error on value ")" (tRPAREN)
  skipping app/views/instruction_items/_form.html.erb
  parse error on value ")" (tRPAREN)
  skipping app/views/companies/_form.html.erb
  parse error on value ")" (tRPAREN)
  skipping app/views/instructions/_form.html.erb
  parse error on value ")" (tRPAREN)
  skipping app/views/company_groups/_form.html.erb
  parse error on value ")" (tRPAREN)
  skipping app/views/replies/_form.html.erb
  parse error on value ")" (tRPAREN)
  skipping app/views/replies/edit.html.erb
  parse error on value ")" (tRPAREN)
  skipping app/views/devise/unlocks/new.html.erb
  parse error on value ")" (tRPAREN)
  skipping app/views/devise/registrations/new.html.erb
  parse error on value ")" (tRPAREN)
  skipping app/views/devise/registrations/edit.html.erb
  parse error on value ")" (tRPAREN)
  skipping app/views/devise/confirmations/new.html.erb
  parse error on value ")" (tRPAREN)
  skipping app/views/devise/passwords/new.html.erb
  parse error on value ")" (tRPAREN)
  skipping app/views/devise/passwords/edit.html.erb
  parse error on value ";" (tSEMI)
  skipping app/views/devise/shared/_links.erb
  parse error on value ")" (tRPAREN)
  skipping app/views/devise/sessions/new.html.erb
** Running the specs/tests in the [test] environment
saikuro --error_cyclo 7 --output_directory tmp/metric_fu/scratch/saikuro --formater text --input_directory app lib --cyclo  --filter_cyclo 0 --warn_cyclo 5 --input_directory app --input_directory lib 
Parsing app/views/ui/dashboard_panel.html.erb
Parsing app/views/ui/dashboard.html.erb
Parsing app/views/ui/index.html.erb
Parsing app/views/ui/left_menu.html.erb
Parsing app/views/ui/dashboard_panel.js.erb
Parsing app/views/devise/sessions/new.html.erb
Parsing app/views/devise/shared/_links.erb
Parsing app/views/devise/shared/_custom_user_fields.html.erb
Parsing app/views/devise/passwords/edit.html.erb
Parsing app/views/devise/passwords/new.html.erb
Parsing app/views/devise/confirmations/new.html.erb
Parsing app/views/devise/mailer/unlock_instructions.html.erb
Parsing app/views/devise/mailer/confirmation_instructions.html.erb
Parsing app/views/devise/mailer/reset_password_instructions.html.erb
Parsing app/views/devise/registrations/edit.html.erb
Parsing app/views/devise/registrations/new.html.erb
Parsing app/views/devise/unlocks/new.html.erb
Parsing app/views/employee_leaves/.componentsMenu.html.erb
Parsing app/views/employee_leaves/.folder.html.erb
Parsing app/views/employee_leaves/new.html.erb
Parsing app/views/employee_leaves/index.html.erb
Parsing app/views/users/contract.html.erb
Parsing app/views/users/leave.html.erb
Parsing app/views/users/attendance.html.erb
Parsing app/views/users/show.html.erb
Parsing app/views/users/index.html.erb
Parsing app/views/users/tabs.html.erb
Parsing app/views/users/history.html.erb
Lexer received an error for line 5 char 2
Parsing app/views/statistics/index.html.erb
Parsing app/views/layouts/application.html.erb
Parsing app/views/recruitment/index.html.erb
Parsing app/views/replies/update.js.erb
Parsing app/views/replies/edit.html.erb
Parsing app/views/replies/create.js.erb
Parsing app/views/replies/_form.html.erb
Parsing app/views/company_groups/edit.html.erb
Parsing app/views/company_groups/new.html.erb
Parsing app/views/company_groups/show.html.erb
Parsing app/views/company_groups/index.html.erb
Parsing app/views/company_groups/_form.html.erb
Parsing app/views/instructions/_item.html.erb
Parsing app/views/instructions/edit.html.erb
Parsing app/views/instructions/new.html.erb
Parsing app/views/instructions/create.js.erb
Parsing app/views/instructions/show.html.erb
Parsing app/views/instructions/index.html.erb
Parsing app/views/instructions/manage.html.erb
Parsing app/views/instructions/_form.html.erb
Parsing app/views/companies/edit.html.erb
Parsing app/views/companies/new.html.erb
Parsing app/views/companies/show.html.erb
Parsing app/views/companies/index.html.erb
Parsing app/views/companies/_form.html.erb
Parsing app/views/instruction_items/edit.html.erb
Parsing app/views/instruction_items/_reply.html.erb
Parsing app/views/instruction_items/new.html.erb
Parsing app/views/instruction_items/create.js.erb
Parsing app/views/instruction_items/show.html.erb
Parsing app/views/instruction_items/_form.html.erb
Parsing app/views/software_projects/edit.html.erb
Parsing app/views/software_projects/new.html.erb
Parsing app/views/software_projects/show.html.erb
Parsing app/views/software_projects/index.html.erb
Parsing app/views/software_projects/_form.html.erb
Parsing app/controllers/application_controller.rb
Parsing app/controllers/replies_controller.rb
Parsing app/controllers/users_controller.rb
Parsing app/controllers/ui_controller.rb
Parsing app/controllers/statistics_controller.rb
Parsing app/controllers/software_projects_controller.rb
Parsing app/controllers/company_groups_controller.rb
Parsing app/controllers/recruitment_controller.rb
Parsing app/controllers/instruction_items_controller.rb
Parsing app/controllers/employee_leaves_controller.rb
Parsing app/controllers/companies_controller.rb
Parsing app/controllers/instructions_controller.rb
Parsing app/models/instruction_item.rb
Parsing app/models/user.rb
Parsing app/models/reply.rb
Parsing app/models/software_project_test_item.rb
Parsing app/models/instruction.rb
Parsing app/models/company_group.rb
Parsing app/models/employee_leave.rb
Parsing app/models/software_project.rb
Parsing app/models/company.rb
Parsing app/helpers/recruitment_helper.rb
Parsing app/helpers/users_helper.rb
Parsing app/helpers/statistics_helper.rb
Parsing app/helpers/software_projects_helper.rb
Parsing app/helpers/companies_helper.rb
Parsing app/helpers/company_groups_helper.rb
Parsing app/helpers/employee_leaves_helper.rb
Parsing app/helpers/application_helper.rb
Parsing app/views/ui/dashboard_panel.html.erb
Parsing app/views/ui/dashboard.html.erb
Parsing app/views/ui/index.html.erb
Parsing app/views/ui/left_menu.html.erb
Parsing app/views/ui/dashboard_panel.js.erb
Parsing app/views/devise/sessions/new.html.erb
Parsing app/views/devise/shared/_links.erb
Parsing app/views/devise/shared/_custom_user_fields.html.erb
Parsing app/views/devise/passwords/edit.html.erb
Parsing app/views/devise/passwords/new.html.erb
Parsing app/views/devise/confirmations/new.html.erb
Parsing app/views/devise/mailer/unlock_instructions.html.erb
Parsing app/views/devise/mailer/confirmation_instructions.html.erb
Parsing app/views/devise/mailer/reset_password_instructions.html.erb
Parsing app/views/devise/registrations/edit.html.erb
Parsing app/views/devise/registrations/new.html.erb
Parsing app/views/devise/unlocks/new.html.erb
Parsing app/views/employee_leaves/.componentsMenu.html.erb
Parsing app/views/employee_leaves/.folder.html.erb
Parsing app/views/employee_leaves/new.html.erb
Parsing app/views/employee_leaves/index.html.erb
Parsing app/views/users/contract.html.erb
Parsing app/views/users/leave.html.erb
Parsing app/views/users/attendance.html.erb
Parsing app/views/users/show.html.erb
Parsing app/views/users/index.html.erb
Parsing app/views/users/tabs.html.erb
Parsing app/views/users/history.html.erb
Lexer received an error for line 5 char 2
Parsing app/views/statistics/index.html.erb
Parsing app/views/layouts/application.html.erb
Parsing app/views/recruitment/index.html.erb
Parsing app/views/replies/update.js.erb
Parsing app/views/replies/edit.html.erb
Parsing app/views/replies/create.js.erb
Parsing app/views/replies/_form.html.erb
Parsing app/views/company_groups/edit.html.erb
Parsing app/views/company_groups/new.html.erb
Parsing app/views/company_groups/show.html.erb
Parsing app/views/company_groups/index.html.erb
Parsing app/views/company_groups/_form.html.erb
Parsing app/views/instructions/_item.html.erb
Parsing app/views/instructions/edit.html.erb
Parsing app/views/instructions/new.html.erb
Parsing app/views/instructions/create.js.erb
Parsing app/views/instructions/show.html.erb
Parsing app/views/instructions/index.html.erb
Parsing app/views/instructions/manage.html.erb
Parsing app/views/instructions/_form.html.erb
Parsing app/views/companies/edit.html.erb
Parsing app/views/companies/new.html.erb
Parsing app/views/companies/show.html.erb
Parsing app/views/companies/index.html.erb
Parsing app/views/companies/_form.html.erb
Parsing app/views/instruction_items/edit.html.erb
Parsing app/views/instruction_items/_reply.html.erb
Parsing app/views/instruction_items/new.html.erb
Parsing app/views/instruction_items/create.js.erb
Parsing app/views/instruction_items/show.html.erb
Parsing app/views/instruction_items/_form.html.erb
Parsing app/views/software_projects/edit.html.erb
Parsing app/views/software_projects/new.html.erb
Parsing app/views/software_projects/show.html.erb
Parsing app/views/software_projects/index.html.erb
Parsing app/views/software_projects/_form.html.erb
Parsing app/controllers/application_controller.rb
Parsing app/controllers/replies_controller.rb
Parsing app/controllers/users_controller.rb
Parsing app/controllers/ui_controller.rb
Parsing app/controllers/statistics_controller.rb
Parsing app/controllers/software_projects_controller.rb
Parsing app/controllers/company_groups_controller.rb
Parsing app/controllers/recruitment_controller.rb
Parsing app/controllers/instruction_items_controller.rb
Parsing app/controllers/employee_leaves_controller.rb
Parsing app/controllers/companies_controller.rb
Parsing app/controllers/instructions_controller.rb
Parsing app/models/instruction_item.rb
Parsing app/models/user.rb
Parsing app/models/reply.rb
Parsing app/models/software_project_test_item.rb
Parsing app/models/instruction.rb
Parsing app/models/company_group.rb
Parsing app/models/employee_leave.rb
Parsing app/models/software_project.rb
Parsing app/models/company.rb
Parsing app/helpers/recruitment_helper.rb
Parsing app/helpers/users_helper.rb
Parsing app/helpers/statistics_helper.rb
Parsing app/helpers/software_projects_helper.rb
Parsing app/helpers/companies_helper.rb
Parsing app/helpers/company_groups_helper.rb
Parsing app/helpers/employee_leaves_helper.rb
Parsing app/helpers/application_helper.rb
rake aborted!
undefined method `chr' for nil:NilClass
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/metric_fu-2.0.1/lib/generators/stats.rb:29:in `remove_noise'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/metric_fu-2.0.1/lib/generators/saikuro.rb:128:in `find_all'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/metric_fu-2.0.1/lib/generators/stats.rb:29:in `each'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/metric_fu-2.0.1/lib/generators/stats.rb:29:in `find_all'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/metric_fu-2.0.1/lib/generators/stats.rb:29:in `remove_noise'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/metric_fu-2.0.1/lib/generators/stats.rb:11:in `analyze'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/metric_fu-2.0.1/lib/base/generator.rb:126:in `send'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/metric_fu-2.0.1/lib/base/generator.rb:126:in `generate_report'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/metric_fu-2.0.1/lib/base/generator.rb:124:in `each'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/metric_fu-2.0.1/lib/base/generator.rb:124:in `generate_report'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/metric_fu-2.0.1/lib/base/generator.rb:52:in `generate_report'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/metric_fu-2.0.1/lib/base/report.rb:54:in `add'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/metric_fu-2.0.1/lib/../tasks/metric_fu.rake:6
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/metric_fu-2.0.1/lib/../tasks/metric_fu.rake:6:in `each'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/metric_fu-2.0.1/lib/../tasks/metric_fu.rake:6
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/home/pma/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/gems/rake-0.8.7/bin/rake:31
/home/pma/.rvm/gems/ree-1.8.7-2010.02/bin/rake:19:in `load'
/home/pma/.rvm/gems/ree-1.8.7-2010.02/bin/rake:19

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

静若繁花 2024-10-12 04:43:58

该行在最新版本的 metric_fu 中已更改,因此我建议升级到最新的宝石: http://rubygems.org/gems/metric_fu/versions/2.1.1< /a>

通过这一更改,您至少不会收到与 chr 未定义相关的致命错误。

That line has changed in the latest version of metric_fu, so I'd recommend upgrading to the latest gem: http://rubygems.org/gems/metric_fu/versions/2.1.1

With that change, you at least won't get a fatal error related to chr being undefined.

尴尬癌患者 2024-10-12 04:43:58

问题是 Ruby 1.9,我报告了一个问题,并且几乎立即得到回复,说问题不是 metric_fu 而是一些不理解 1.9 语法的指标

https://github.com/jscruggs/metric_fu/issues/72

The problem is Ruby 1.9, I've reported an issue, and got an almost immediate reply saying the problem is not metric_fu but some of the metrics that doesn't understand 1.9 syntax

https://github.com/jscruggs/metric_fu/issues/72

提赋 2024-10-12 04:43:58

我安装了 metrical 作为 metric_fu 的包装器,并且正在运行 Rails 3.1rc4 和 Ruby 1.9.2,

我遇到了一堆错误,这些错误阻止了任何事情的发生,在谷歌搜索后发现其他人说他们通过删除 rcov、reek、flog 得到了结果和 flay 所以我做了同样的事情,但实际上我发现通过一次添加一个,实际上只有鞭打才导致这个错误是致命的。因此,我建议将 .metrics 文件添加到 Rails 应用程序的根目录中 - 这是我的:

MetricFu::Configuration.run do |config|  
#   config.metrics -= [:rcov]  
#   config.metrics -= [:reek]  
#   config.metrics -= [:flay]  
  config.metrics -= [:flog]
end  

现在工作正常,我几乎完全覆盖了 metric_fu。

I installed metrical as a wrapper for metric_fu and I am running Rails 3.1rc4 and Ruby 1.9.2

I got a bunch of errors which prevented anything from happening and after Googling found other people saying that they got a result by removing rcov, reek, flog and flay so I did the same but I've actually found by adding back one at a time that it's really only flog that is causing this error to be fatal. So I'd suggest adding a .metrics file into the root directory of your rails application - here's mine:

MetricFu::Configuration.run do |config|  
#   config.metrics -= [:rcov]  
#   config.metrics -= [:reek]  
#   config.metrics -= [:flay]  
  config.metrics -= [:flog]
end  

This works fine now and I have almost complete coverage from metric_fu.

要走就滚别墨迹 2024-10-12 04:43:58

我认为这是一个 rcov 问题。 Ryan 在 Railscast 中提到了这一点

# Gemfile
gem "simplecov", :require => false, :group => :test

# .metrics
MetricFu::Configuration.run do |config|
  config.metrics -= [:rcov]
end

http://railscasts.com/episodes/252-metrics -metrics-指标

I think its an rcov problem. Ryan mentions it in the railscast if so

# Gemfile
gem "simplecov", :require => false, :group => :test

# .metrics
MetricFu::Configuration.run do |config|
  config.metrics -= [:rcov]
end

http://railscasts.com/episodes/252-metrics-metrics-metrics

岁月染过的梦 2024-10-12 04:43:58

我是 metric_fu 的新维护者,它现在应该可以正常工作了。请参阅配置说明 https://github.com/metricfu/metric_fu

另外,它可以通过命令运行 -现在就行。现在需要捆绑它或运行 rake 或 metrical

I'm the new maintainer of metric_fu and it should work now without any problems. See configuration instructions at https://github.com/metricfu/metric_fu

Also, it works from the command-line now. Now need to bundle it or run rake or metrical

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文