Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

broken, I guess? #30

Open
ghost opened this issue Feb 16, 2011 · 4 comments
Open

broken, I guess? #30

ghost opened this issue Feb 16, 2011 · 4 comments

Comments

@ghost
Copy link

ghost commented Feb 16, 2011

I did gem install cover_me, no errors. I see the gem listed when I run gem list.

I added require 'cover_me' to the TOP of my test_helper.rb.

I ran rails g cover_me:install. I noticed a new file, lib/tasks/cover_me.rake:

namespace :cover_me do
task :report do
require 'cover_me'
CoverMe.complete!
end
end
task :test do
Rake::Task['cover_me:report'].invoke
end
task :spec do
Rake::Task['cover_me:report'].invoke
end

Problems:

  1. When I run rake -T I do not see any "cover_me" tasks.

  2. When I run rake cover_me:report, I get:

Couldn't get a file descriptor referring to the console

  1. When I Google "cover_me Couldn't get a file descriptor referring to the console" I get nothing helpful.
@bdwong
Copy link

bdwong commented Mar 1, 2011

I ran into this as well. I think these can be considered example rake tasks for rails code coverage. Try running rake spec or rake test and the default coverage directory will be created.

@kkdoo
Copy link

kkdoo commented Mar 5, 2011

Same on ubuntu 10.10 with ruby 1.9.2-head and rails 3. Any fix?

@ghost
Copy link
Author

ghost commented Mar 5, 2011

The fix for me was to use simplecov:

https://github.com/colszowka/simplecov

It's really nice.

@functionreturnfunction
Copy link

If this helps anyone, this is looking like an Ubuntu issue. My development virtual machine runs 10.04, and I'm able to get a coverage report thusly:

~/my/rails/project$ sudo ~/.rvm/bin/rake test

This led me to the discovery that /dev/console is readable/writable by root and no one else. On a whim I made it world-readable (sudo chmod +r /dev/console), and the new error I get is:

openvt: Unable to open /dev/tty8: Permission denied

So the answer is buried somewhere in the specific way the Ubuntu handles consoles/ttys/security. I'll post more here if I find anything else out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants