Currently I am cursed with trying to develop a Ruby on Rails app in Windows and then deploy to Linux. I am looking for a gem/plugin that will allow me to capture screenshots and feed them back to the user. WebSnap looked promising but I keep running into issues (error: Could not locate wkhtmltoimage-proxy executable) even though I have the bat files in the path and in just about any folder I can think of.
So, does anyone have a suggestion for a library that will work on Windows that will allow me to do this? Or in another vein a way to resolve the wkhtmltoimage-proxy executable issue?
Code:
format.png {
html = render :action => "show.html.erb", :layout => "application.html.erb"
Rails.logger.debug("html: " + html.inspect)
snap = WebSnap.new(html, :format => 'png',
:'scale-h' => nil,
:'scale-w' => nil,
:'crop-h' => nil,
:'crop-w' => nil,
:quality => 100,
:'crop-x' => nil,
:'crop-y' => nil )
send_data snap.to_bytes, :filename => "dashboard.png",
:type => "image/png",
:disposition => 'inline'
}