Rcov not working?

I followed the instructions in the rspec book to setup rcov. I appened
to the end of my RAILS_ROOT/Rakefile:
require ‘rake’
require ‘spec/rake/spectask’
namespace :spec do
desc “Run specs with RCov”
Spec::Rake::SpecTask.new(‘rcov’) do |t|
t.spec_files = FileList[‘spec/**/*_spec.rb’]
t.rcov = true
t.rcov_opts = [’–exclude’, ‘/Library/Ruby’]
end
end

When running I get:

rake spec:rcov --trace
(in /Users/patrick/coding/rails/xyz_app)

** Invoke spec:rcov (first_time)
** Invoke spec:clobber_rcov (first_time)
** Execute spec:clobber_rcov
rm -r coverage
rm -r coverage
** Execute spec:rcov
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: No
such file or directory – rcov (LoadError)
rake aborted!
Command
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
-I"lib" -S rcov --exclude “spec/,gems/” --rails -o “coverage”
“/Users/patrick/coding/rails/xyz_app/vendor/gems/rspec-1.2.9/bin/spec”
– “spec/controllers/admin/media_files_controller_spec.rb”
“spec/controllers/admin/photos_controller_spec.rb”
“spec/controllers/admin/trees_controller_spec.rb”
“spec/controllers/admin/webpages_controller_spec.rb”
“spec/helpers/admin/media_files_helper_spec.rb”
“spec/helpers/admin/trees_helper_spec.rb”
“spec/helpers/admin/webpages_helper_spec.rb”
“spec/models/flashparam_spec.rb” “spec/models/flashvar_spec.rb”
“spec/models/photo_album_spec.rb” “spec/models/vcard_spec.rb”
“spec/renderers/content_renderer_spec.rb”
“spec/renderers/tree_select_renderer_spec.rb” --options
“/Users/patrick/coding/rails/xyz_app/spec/spec.opts” failed
/Users/patrick/coding/rails/xyz_app/vendor/gems/rspec-1.2.9/lib/spec/rake/spectask.rb:177:in
define' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:1112:inverbose’
/Users/patrick/coding/rails/xyz_app/vendor/gems/rspec-1.2.9/lib/spec/rake/spectask.rb:153:in
define' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:incall’
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in execute' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:ineach’
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in execute' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:ininvoke_with_call_chain’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in
synchronize' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:ininvoke_with_call_chain’
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in invoke' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:ininvoke_task’
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in top_level' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:ineach’
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in top_level' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:instandard_exception_handling’
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in top_level' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:inrun’
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
standard_exception_handling' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:inrun’
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:19:in `load’
/usr/bin/rake:19

Patrick J. Collins
http://collinatorstudios.com

It looks like it can’t find Rcov… do you have rcov installed? can
you rcov --help from a command line?

Thanks
Jay

On Wed, Apr 28, 2010 at 11:10 PM, Patrick J. Collins

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs