RE: [Rails] Execute shell command from Rails

Hi Chuong,

I’ve used ‘open3’ http://www.ruby-doc.org/stdlib/libdoc/open3/rdoc/index.html repeatedly with succes.

(used open3 because I needed stdout and stderr)

Piet.

%x{shellcommand}

e.g.

%x{ls -l /}

Hi,

Thank you for the info. I’ve found out also Kernel.system, IO.popen. I will try them all.

  • Chuong