Ruby's %x{} -- running system commands

The command I execute within %x{…}, if executed on the command line,
works perfectly, every time.

If I run the same command within Ruby’s %x{…}, I get mixed results.
Sometimes a blank string, other times the expected output.

Why?

On Apr 29, 2010, at 16:19 , Daniel W. wrote:

The command I execute within %x{…}, if executed on the command line,
works perfectly, every time.

If I run the same command within Ruby’s %x{…}, I get mixed results.
Sometimes a blank string, other times the expected output.

Why?

We can’t possibly answer that without more information. Provide us
enough information that we might be able to see the problem.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs