F
Fritz Anderson
I'm doing a fork/exec on a .rb file in the same directory as the parent
rb. On two systems, this has worked. On the third, to which I just
moved, I get
/ecod-poll:254:in `exec': No such file or directory -
/home/fritza/ecod/mail-tail/ecod-tracker.rb (Errno::ENOENT)
I've put debugging puts'es into the code, and the path I'm using looks
OK. Feeding the path from the puts to "ls -l" shows that the file exists
and is world-readable and world-executable.
Would someone please help me figure this out? No doubt it's something
dumb, but I'm just not seeing it.
===
On the non-working system: ruby 1.8.5 (2006-08-25) [x86_64-linux] |
Rails 2.2.2
On the working system: ruby 1.8.5 (2006-08-25) [x86_64-linux] | Rails
2.0.2
My source on the non-working system is a Subversion checkout of what's
on the working one. Subversion has (I'm pretty sure) successfully
transported between two working systems.
I am also using ActiveRecord standalone, and I'm sure none of the MySQL
and supporting versions match.
===
while $processQueue.length < MAX_PROCESSES && $requestQueue.length >
0
messageID = $requestQueue.shift
pid = fork
puts "./ecod-tracker.rb ->
#{File.expand_path('./ecod-tracker.rb')}"
# => ./ecod-tracker.rb ->
/home/fritza/ecod/mail-tail/ecod-tracker.rb
# ls -l on that path shows an executable file there.
puts Dir.pwd
# => /home/fritza/ecod/mail-tail
exec(File.expand_path('./ecod-tracker.rb'), messageID) if pid.nil?
# => No such file or directory -
/home/fritza/ecod/mail-tail/ecod-tracker.rb
end
rb. On two systems, this has worked. On the third, to which I just
moved, I get
/ecod-poll:254:in `exec': No such file or directory -
/home/fritza/ecod/mail-tail/ecod-tracker.rb (Errno::ENOENT)
I've put debugging puts'es into the code, and the path I'm using looks
OK. Feeding the path from the puts to "ls -l" shows that the file exists
and is world-readable and world-executable.
Would someone please help me figure this out? No doubt it's something
dumb, but I'm just not seeing it.
===
On the non-working system: ruby 1.8.5 (2006-08-25) [x86_64-linux] |
Rails 2.2.2
On the working system: ruby 1.8.5 (2006-08-25) [x86_64-linux] | Rails
2.0.2
My source on the non-working system is a Subversion checkout of what's
on the working one. Subversion has (I'm pretty sure) successfully
transported between two working systems.
I am also using ActiveRecord standalone, and I'm sure none of the MySQL
and supporting versions match.
===
while $processQueue.length < MAX_PROCESSES && $requestQueue.length >
0
messageID = $requestQueue.shift
pid = fork
puts "./ecod-tracker.rb ->
#{File.expand_path('./ecod-tracker.rb')}"
# => ./ecod-tracker.rb ->
/home/fritza/ecod/mail-tail/ecod-tracker.rb
# ls -l on that path shows an executable file there.
puts Dir.pwd
# => /home/fritza/ecod/mail-tail
exec(File.expand_path('./ecod-tracker.rb'), messageID) if pid.nil?
# => No such file or directory -
/home/fritza/ecod/mail-tail/ecod-tracker.rb
end