[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

What's wrong with "exec"?

Cheyne Li

8/12/2008 9:29:00 PM

Hi, there

I use NETBEAN IDE 6.1. I tried to run CCC.exe by calling exec. But,
don't know why it keeps throwing error message,

"C:\Documents and Settings\cheynel\My
Documents\NetBeansProjects\task1\lib\fexc.rb:8: No such file or
directory - cannot execute (Errno::ENOENT)"

code is as following,

8 Dir.chdir("C:\\AAA\\BBB")
9 if File.exist?("CCC.exe")
10 puts "existed"
11 end
12 exec("CCC.exe")

Does any one have any idea what's wrong here? Thanks in advance
--
Posted via http://www.ruby-....

1 Answer

Shashank Agarwal

8/13/2008 1:34:00 AM

0

Cheyne Li wrote:
> 12 exec("CCC.exe")

Try passing the entire path of the file.exe.
--
Posted via http://www.ruby-....