Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8288547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:18:15+00:00 2026-06-08T12:18:15+00:00

I try to run system ./do_backup.py within my rake task, where do_backup.py is a

  • 0

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
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T12:18:17+00:00Added an answer on June 8, 2026 at 12:18 pm

    As discussed in the comments, this was being run from the wrong directory. You can change directories with Dir.chdir(). For example:

      ...
      Dir.chdir("lib/tasks")
      system "./do_backup.py #{S3ID} #{S3KEY} #{SRCBUCKET} #{NUM_BACKUP_BUCKETS}"
    end
    

    Of course, as @muistooshort points out, the simpler thing is to just run it from where it is:

      system "#{Rails.root}/lib/tasks/do_backup.py #{S3ID} #{S3KEY} #{SRCBUCKET} #{NUM_BACKUP_BUCKETS}"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I try and run django, this is what I get: /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python manage.py runserver
System: Mac OSX 10.6.5, Python 2.6 I try to run the python script below:
I try run jconsole with jar that contains my classes like: cd C:\Program Files\Java\jdk1.6.0_26\bin
I'm getting this error when I try run DB:Rake : ** Invoke db:migrate (first_time)
I try to run one program in myeclipse where after creating one web project
I need to run a shell command asynchronously from a Python script. By this
When I try to run an x86 assembly language (built using MASM) program on
I've gotten MDB-Tools compiled for OSX, but when I try to run a sample
I try to run a medium sized programm with a lot of external jars
I try to run the following raw query in android, it seems not work

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.