Closed bbuchalter closed 6 years ago
I am getting this message how to resolve it where to write/override default options
I'm seeing the same issue. FWIW, I'm also on Ubuntu (Server 10.0.4 LTS).
CoverMe calls "open" command by default to open browser for Mac OS X, but Ubuntu's "open" is not the same and outputs "Couldn't get a file descriptor referring to the console". If you want to open browser automatically to see coverage report, configure like this:
browser_cmd = 'forefox' # or '/etc/alternatives/x-www-browser' and so on
CoverMe.config do |conf|
conf.at_exit = proc {
if CoverMe.config.formatter == CoverMe::HtmlFormatter
index = File.join(CoverMe.config.html_formatter.output_path, 'index.html')
if File.exists?(index)
`#{browser_cmd} #{index}`
end
end
}
end
If not, for instance on a server, simply configure like this:
CoverMe.config do |conf|
conf.at_exit = proc {}
end
Thanks, the latter fixed it for me.
Solved that problem but files are not generating
You might find a solution in issue #50 or #51.
Decided to remove it from my app
This issue exists on non-ubuntu/debian linux distribution. The file /etc/alternatives/x-www-browser
does not exists.
For linux, xdg-open [url]
is a better bet.