> As the previous posters said: do you have your shell in the chrooted dir?
>

No, but that doesn't normally matter as you're running chrooted in a
shell that has echo as a builtin. Clearly ruby attemps to re-exec
/bin/sh for every command, so it doesn't work.

If you manually chroot from a shell, and then a ruby script with only
the second line, that does work, because echo is a builtin. But only
then.

Martin