CGI and NET::SSH in the same script problems

I'm perplexed as to why I can run the following just fine from a command
line, but when I try to execute from a web browser it crashes.

From the command line it prints out...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"><HTML><BODY><H3>FlyBOB Control
Panel</H3><P>cmd=>[echo 'THIS IS A TEST FROM THE REMOTE SHELL'] got
stdout:
THIS IS A TEST FROM THE REMOTE SHELL
cmd=>[echo 'THIS IS A TEST FROM THE REMOTE SHELL']
closing!</P></BODY></HTML>

Which means if this text is rendered in a web environment it should
print
THIS IS A TEST FROM THE REMOTE SHELL

Does anyone know why you can't call net/ssh from a CGI or how to debug
this in a browser environment?

----------------------------- ruby cgi script