# Prob with IO.popen

**URL:** <https://www.ruby-forum.com/t/prob-with-io-popen/127839>\
**Category:** Ruby\
**Created:** [February 1, 2008, 7:50pm UTC](https://www.ruby-forum.com/t/prob-with-io-popen/127839 "2008-02-01T19:50:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Une\_BSSSSvS\_ue](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/2acd7d/32.png) [@Une\_BSSSSvS\_ue](https://www.ruby-forum.com/u/Une_BSSSSvS_ue)\
**Post date:** [February 1, 2008, 7:50pm UTC](https://www.ruby-forum.com/t/prob-with-io-popen/127839/1 "2008-02-01T19:50:54Z")

</div>

if i do :

lines = IO.popen( “ls -alR /Users/yt/work/Ruby/IO”)  
lines.each { | line | puts line }

i get the expected output of $ ls -alR

however (on Mac OS X 10.4.11) the following :

cmd = IO.popen( “/usr/bin/nibtool -c MainMenu.nib” )  
puts “|#{cmd.readlines}|”

gaves me nothing :[

however, using the terminal in command line :

$ nibtool -c MainMenu.nib

## gave me :

## /\* Classes _/ Classes = { IBClasses = ( { ACTIONS = { “about\_win” = id; […] “toggle\_drawer” = id; }; CLASS = AB2Html; LANGUAGE = ObjC; OUTLETS = { “cancel\_btn” = id; […] “theme\_cb” = id; }; SUPERCLASS = NSObject; }, {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; } ); IBVersion = 1; }; /_ End Classes \*/

the expected result

how to get the same thing from ruby ???
