I try to run system "./do_backup.py" within my rake task, where do_backup.py is a python program in the same directory, but the command fails silently. I can run it using system "./do_backup.py", however.
I called system "whoami" from both within my rake task and the IRB, and the users are the same.
EDIT
Here’s the rakefile:
desc "Back up a file onto S3"
task :backup do
S3ID = "AKIAJM3NRWxxx"
S3KEY = "0A5kuzV+E1dkaPjxxx"
SRCBUCKET = "rose-test-4"
NUM_BACKUP_BUCKETS = 2
system "whoami"
system "./do_backup.py #{S3ID} #{S3KEY} #{SRCBUCKET} #{NUM_BACKUP_BUCKETS}"
end
As discussed in the comments, this was being run from the wrong directory. You can change directories with
Dir.chdir(). For example:Of course, as @muistooshort points out, the simpler thing is to just run it from where it is: