I am new to RoR and ruby, but am a very experience PHP developer. Let
me give an overview of the problem.
I have a model Latency, which contains username, graph_name so the
logged in user can see his/her latency graphs.
In my ViewController I have a fuction view_latency which pulls the
correct latency object and runs latency.overview. latency.overview
creates a .png file in /tmp, and view_latency then sends this using
send_file to an image tag on the man page.
latency.overview uses RRDtool(from rrdtool.rubyforge.org) to create the
.png file from a .rrd. I have put require ‘RRDtool’ in
config/environment.rb. I have also tried putting it in my latency.rb
model, but it doesn’t change the problem I’m having which is:
When a user has only one graph, this works perfectly. As soon as there
is more than one graph on the main page, no image is returned and the
“no image” icon is displayed in FireFox. If I ‘View Image’ directly,
there is no image and “Application error (Rails)” in an
The logs for webrick don’t show anything out of the ordinary, but
tail’ing development.log shows the error stated below.
If I restart webrick, and hit on refresh in FireFox, it works again. I
can jump up and down on refresh all I want, even go to another graph
directly and all is good. Then when I go back to the page with many
graphs, it falls over again.
I have a feeling it is something to do with the session being locked
(shrug) but I have no idea where to go from here. Please could
Error from development.log:
(500 Internal Error)
No such file or directory -