Error accessing X.Org commands with ruby shell command scripts

I am trying to run an X.Org command from within ruby’s shell commands
and am
receiving “Command Not Found” errors.

As a walk through, I first start my X server (xvfb) and then start irb.
In
irb, if I type:

ls -al

I get the results I’d expect. But, if I type:

DISPLAY=:1 firefox

I receive “command not found” error for the entire command. At first, I
thought that X11 permissions were preventing me from accessing such
commands; but, I shouldn’t see the “command not found” error if this was
the
case. When I close irb and run the same command DISPLAY=:1 firefox, I
get
the results that I expect. I’ve tried this with several X11 commands
from
within irb and receive the same error. I thought about whether a ruby
binding would fix this issue but I’m under the assumption that the shell
scripts (I’ve tried ``, %x[], system) only run the raw command… i.e.
DISPLAY:=1 firefox translates to DISPLAY:=1 firefox in the shell.

Would anyone know how I can access such a command from within a ruby
shell
command?

Any help would be greatly appreciated.

Thanks,
Greg

Gregory M. wrote:

DISPLAY=:1 firefox

This works:

env DISPLAY=:1 firefox

Joel, thank you.