views:

46

answers:

1

In my app, a user can run a script, and if it is run in the terminal, it shows a nice progress bar, how would I replicate this in rails? I mean I could do like something between the two to communicate, but I would prefer if it would just show a "live" shell output.

Thanks :)

A: 

If your script is invoked with 2>&1 at the end, backticks invocation will return STDOUT & STDERR.

result = ‘ls 2>&1‘

Tom Mornini
but how would I integrate that into a view?
Alex