Prob with IO.popen

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 ???