I may be barking up the entire wrong tree here but in case I am not, here’s a go.
I am using Websnap to generate a png file of the Show page. When I go to show.png I get a blank white page and no file downloads. It was my expectation that I would get a cute little png downloaded to my machine.
And, I get nada in the log file… not even the debug statements I put in.
Respond to code:
respond_to do |format|
format.html # index.html.erb
format.png {
#html = render :action => "show.html.erb", :layout => "application.html.erb"
snap = WebSnap::Snapper.new("/dashboard/show?application=#{@application}&version=#{@jira_version}", :format => 'png')
send_data snap.to_bytes, :filename => "dashboard.png", :type => "image/png", :disposition => 'inline'}
end
environment.rb
Mime::Type.register "image/png", :png
Turns out Websnap was having an issue finding the wkhtmltoimage executable it put on the system in the first place. I really need to rewrite that Gem.