Quick test: $ ruby -e 'open("|pbcopy", "w") { |io| io << "test #{rand}" }; puts(`pbpaste`)' test 0.8639874244022235 $ macruby -e 'open("|pbcopy", "w") { |io| io << "test #{rand}" }; puts(`pbpaste`)' -e:1:in `<main>': not opened for writing (IOError) Why the error with MacRuby?