[Rails] Re: interactive web app

User
Wed, 05 Jul 2006 13:51:58 -0000

I have 3 concerns:

1)By sending output of program to a text file, you mean modify the
binary right?

2)And if I were to modify the binary and send all outputs to a text file
and not stdout, how do I specifically read just the last lines that were
added, instead of rereading the whole file from the top.

3) How do I do an update every few seconds using AJAX and how would I
update it without redisplaying the entire file, but rather just the new
lines that were added to the file.

thanks

Inge J?rgensen wrote:
> That''s not a problem. Send the output of the program to a text
file
> (works on both *nix and windows). Create a rails action that parses the
> file and outputs either the last line or the entire file (depending on
> what you''re trying to do). Then, create an ajax updater in the
view that
> updates a div every few seconds with the output of the action.