What's wrong with "exec"?

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

Cheyne Li wrote:

12 exec(“CCC.exe”)

Try passing the entire path of the file.exe.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs