Jenkins console output not in realtime
===

Pretty new to Jenkins and I have simple yet annoying problem. When I run job (Build) on Jenkins I am triggering ruby command to execute my test script.

Problem is Jenkins is not displaying output in real time from console. Here is trigger log.

    Building in workspace /var/lib/jenkins/workspace/foo_bar
    No emails were triggered.
    [foo_bar] $ /bin/sh -xe /tmp/hudson4042436272524123595.sh
    + ruby /var/lib/jenkins/test-script.rb

Basically it hangs on this output until build is complete than it just shows full output. Funny thing is this is not consistent behavior, sometimes it works as it should. But most of the time there is no real time console output.

Jenkins version: 1.461