
How to Screenshot a Ruby on Rails App

Snapshot Site Team
04 Jan 2026 - 02 Mins read
Most Rails screenshot needs fall into one of two buckets: authenticated internal screens (covered in How to Screenshot a Login-Protected SaaS App in Ruby) and everything else — public marketing pages, ERB-rendered reports, and Turbo/Hotwire-driven views that update parts of the page without a full reload. This post covers that second, broader case.
Why Rails Apps Need a Little Care
- Turbo Frames and Turbo Streams update sections of a page after the initial load, similar to any reactive frontend — a capture taken too early can miss the settled state.
- ERB-rendered dashboards built with gems like Blazer or a custom admin layout are often long, table-heavy pages.
- Asset pipeline timing occasionally means a page's styles finish applying a beat after the HTML arrives, especially on a cold cache.
Ruby Example
require "net/http"
require "uri"
require "json"
uri = URI("https://api.prod.ss.snapshot-site.com/api/v1/screenshot")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri.path, {
"Content-Type" => "application/json",
"x-snapshotsiteapi-key" => "YOUR_API_KEY"
})
request.body = {
url: "https://example.com/reports/monthly",
format: "png",
width: 1440,
height: 900,
fullSize: true,
hideCookie: true,
delay: 2
}.to_json
response = http.request(request)
puts response.body
delay covers the gap between the initial page load and any Turbo Stream updates that follow — without it, a capture risks catching the page mid-update.
Practical Recommendations
- Use
delayon Turbo-driven pages. A short delay (1-2 seconds) is usually enough for Turbo Frames to settle after the initial navigation. - Default to
fullSize: truefor reports and dashboards. ERB-rendered admin views are frequently longer than a single screen. - Strip flash messages and debug toolbars with
hide. Rails' development-mode debug bar or a leftover flash notice should not appear in a shared screenshot.
Common Use Cases
- Visual QA before deploying a view or layout change
- Documentation screenshots for internal admin panels and knowledge bases
- Dated records of a report's exact state at generation time
- Feeding a scheduled visual monitor, as described in Visual Uptime Monitoring
For Rails teams, Snapshot Site handles the rendering concern the same way it does for any other backend — one HTTP call, no browser dependency added to your own stack.

