When I run my Ruby script that requires watir-webdriver which in turn uses Chrome, I get the following Ruby error:
https://gist.github.com/anonymous/8939d7cd5bf39b7e7a36240b614985bc
When I run google-chrome in terminal I get the following error:
[12311:12311:1016/152548:ERROR:browser_main_loop.cc(260)] Gtk: cannot open display:
I have concluded that this must be because the server is GUI-less. How can I work around this?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
I would recommend checking out xvfb which allows you to have a virtual display and is often used to run apps with a GUI in a headless environment. This guide should be helpful.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.