我试图在我的Ruby 1.9环境中安装metric_fu,但由于下面的问题它失败了:
$ gem install metric_fu
...
Fetching: rcov-1.0.0.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing metric_fu:
ERROR: Failed to build gem native extension.
/Users/xxx/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
**** Ruby 1.9 is not supported. Please switch to simplecov ****
Run Code Online (Sandbox Code Playgroud)
它说"切换到simplecov",但该怎么做?
更新:安装rcov 0.9.11后恢复.我在这里发现了同样的问题:
通过将它放在我的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 …Run Code Online (Sandbox Code Playgroud) 最新的ruby内核(1.9.2 | 1.9.3)似乎不支持metric _fu.有没有提供同等功能的宝石.
我在我的应用程序中使用metric_fu和rails_best_practices gem。但是这次我被分配到一个正在开发中超过1年的旧项目。
当我使用rails_best_practices gem生成警告时,发现了数百条警告。
问题是我无法通过所有这数百种警告找到自己产生的警告。我现在不想修复所有这些警告。我只想修复新的警告并标记旧的警告以在将来进行检查。
有什么方法可以忽略这些旧警告?