you should be use 'system' instead of 'exec'. look like this, system 'dir' or `dir` both ok. -- Posted via http://www.ruby-forum.com/.