I am attempting to take screen shots of maps generated with mapbox. I successfully took screenshots until I started storing my data in a file, which mapbox recommends if you have a lot of data. (https://www.mapbox.com/help/working-with-large-geojson-data/#store-geojson-at-url)
Now I get a white screen.
I've added a timeout. It doesn't seem to matter how long I wait.
I believe the data should be loaded via Ajax. I'm running this against a locally running web server. When I view the page using a web browser I see a request for the data file. When the page is loaded via Webshot, there is no attempt to load the data file. Something blocks or it otherwise stops before it tries to load the data.
Any ideas?
Inspired by Ken's questions above, I investigated layer by layer. Webshot is a relatively simple wrapper around capybara, which interacts with phantomjs via the poltergeist gem. Phantomjs has some simple tutorials that step you through interacting with web pages (http://phantomjs.org/quick-start.html#page-loading).
When I asked phantomjs to load my page I immediately saw an error: something like "webgl not defined".
I was using Mapbox GL JS, which requires webgl. Phantomjs does not support webgl (http://phantomjs.org/supported-web-standards.html).
So, while my newer page worked fine in a browser, it was never going to work in phantomjs.
Part of my confusion was that an earlier version of the page worked in both the browser and phantomjs. Then I discovered that we made a change and that change indirectly changed our Mapbox js library from Mapbox.js to mapbox-gl.js.
The solution was to use mapbox.js (not Mapbox-gl.js).
We did this via leaflet.js (http://leafletjs.com/).
Thanks for the help everyone.