[rspec-users] rcov not working?

Jay McGaffigan hooligan495 at gmail.com
Thu Apr 29 00:13:08 EDT 2010


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
<patrick at collinatorstudios.com> wrote:
> 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:in `verbose'
> /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:in `call'
> /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:in `each'
> /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:in `invoke_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:in `invoke_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:in `invoke_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:in `each'
> /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:in `standard_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:in `run'
> /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:in `run'
> /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
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list