On Ruby Quicktips there´s a nice sum up of the three different ways how to execute shell commands from your ruby code. It´s explaining very well the differences between exec, backticks (or %x shortcut) and the system command: Execute Shell Commands
If you need more exhaustive info concerning the three possibilities, the article is listing three links to other resources on the web:
- Ruby Kernel system, exec and %x
- 6 Ways to Run Shell Commands in Ruby
- Calling Bash Commands From Ruby