I’m working on a project right now that is migrating a site to RoR
(originally written in Ruby… but not as easy to add features, hence
migration). The one sticking point is a 3d GDchart graph made using the
gdchart binding for ruby
The problem is that GDChart wants to output the file to a stream (a
STDOUT, etc…). At the moment I have the image being saved to a file,
then using send_file. I would like to find a way to send the image
without saving to a tempfile first.
graph = GDChart::Graph.new ... graph.draw(f) send_file f.path, :type => "image/png", :disposition => "inline"
Any solutions on how to avoid using the file? I’m probably missing
something obvious here. Of course I’m open to other solutions that can
create nice looking 3d charts and graphs.