There are six ways to execute shell commands in ruby. Here are examples for perhaps the two most useful: - Backticks stdout = `touch some_file` # Runs shell command 'touch' with parameter 'some_file' With this you get the command's standard output as a string. - Open3#popen3 stdin, stdout, stderr = Open3.popen3('touch some_file') Use this if you need to catch the standard error stream. To convert a stream to a string, you can do this: err_string = stderr.read More info at: http://zhangxh.net/programming/ruby/6-ways-to-run-shell-commands-in-ruby/