2

I am trying to use headless with watir on windows 7.

env.rb

if ENV['HEADLESS']
  headless = Headless.new
  headless.start
  at_exit do
    headless.destroy
  end
end

When I run a test I am getting following error

$ cucumber --profile bat
*** WARNING: You must use ANSICON 1.31 or higher (http://adoxa.110mb.com/ansicon) to get coloured output on Windows
Using the bat profile...
No such file or directory - which Xvfb (Errno::ENOENT)
c:/Ruby193/lib/ruby/gems/1.9.1/gems/headless-0.3.1/lib/headless/cli_util.rb:4:in ``'

Any Idea on how to fix this ? or this only works on linux ?

amjad
  • 2,876
  • 7
  • 26
  • 43

1 Answers1

2

Headless gem works only on Linux. It does not work on Mac or Windows.

Željko Filipin
  • 56,372
  • 28
  • 94
  • 125
  • On Mac OS, that's because the display isn't provided by X but by Quartz (or whatever), right? Not, as on Windows, because Xvfb doesn't exist. – Al Chou Apr 28 '13 at 17:00
  • In answer to my own comment, I should have said Aqua, not Quartz. In any case, http://j.mp/167A7mp is a tutorial on setting up to run headless on Mac OS X. An equivalent setup could be achieved on Windows via cygwin, probably. – Al Chou Apr 28 '13 at 17:09