From: Bob Calco Date: 2001-12-01T06:02:50+09:00 Subject: [ruby-talk:27126] Re: FW: Kernel::system() not working # First of all, calm youself :-) I've been bragging to co-workers all week about Ruby. I was attempting to show these scripts that, like I've said, WERE working, when Murphey's Law apparently took over. # Please show me result of # ruby -v # on commandline. Ruby 1.6.5 (2001-09-19) [i386-cygwin] # And please try # ruby -e "system('C:/Program Files/Some Company/Some Product/Prog.exe')" # on commandline, too. -e:1: parse error system(C:/Program Files/Some Company/Some Product/Prog.exe) ^ -e:1: parse error system(C:/Program Files/Some Company/Some Product/Prog.exe) ^ -e:1: parse error FYI, this works fine: require 'win32ole' wsh = WIN32OLE.new("WScript.Shell") wsh.Run("\"C:\\Program Files\\Some Company\\Some Product\\Prog.exe\"",1,0) But this does not: ruby -e system("\"C:\\Program Files\\Some Company\\Some Product\\Prog.exe\"") (it does nothing) The same system() command in irb renders: false I'm going with the OLE alternative for now... but I'd rather avoid the overhead if I can. I'm going to try to reinstall Ruby, then I'm going to get really industrious and try to do a win32 build The Old Fashioned Way. Maybe my reliance on the cygwin dll is the problem. Dunno yet. Sincerely, Bob Calco # Regards # -- #U.Nakamura