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 8775683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:52:02+00:00 2026-06-13T18:52:02+00:00

I am thinking of implementing a rake task that would sync certain files in

  • 0

I am thinking of implementing a rake task that would sync certain files in my repository to S3. The catch is that I only want to update the files when they are changed in my Repo. So if file A gets modified and B stays the same, only file A will be synchronized to S3 during my next app deploy.

What is a reliable way to determine that a file has been modified? I am thinking of using git to determine whether the file has been changed locally…. is there any other way to do this? Does S3 provide similar functionality to this?

  • 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-13T18:52:03+00:00Added an answer on June 13, 2026 at 6:52 pm

    S3 does not presently support conditional PUTs, which would be the ideal solution, but you can get this behavior with two requests instead. Your sync operation would look something like:

    • For each file that you want on S3:
      • Calculate the MD5 of the local file.
      • Issue a HEAD request for that S3 object.
      • Issue a PUT request if the object’s Content-MD5 differs or the object does not exist.

    That said, this sounds a lot like something you’d do with assets, in which case you’d be reinventing the wheel. The Rails 3 asset pipeline addresses this problem well — in particular, fingerprinting assets and putting the hash in the URL allows you to serve them with insanely long max-age values since they’re immutable — and the asset_sync gem can already put your assets on S3 automatically.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm thinking about a good solution for implementing a sign up/login system that works
I am currently thinking about implementing an application with NHibernate and I would like
I'm thinking about implementing Intense Debate in my Wordpress site. I know that ID
I'm thinking of implementing Objectify DAO with dependency injection, such that I can maintain
I was thinking about implementing an application in Java (with a GWT GUI) that
I am thinking about implementing a wrapper for MPI that imitates OpenMP's way of
I am thinking what I want to do is impossible but thought I would
I'm thinking of implementing something like the following and would like to know a)
I have been thinking of implementing a PHP messaging system on my site. Would
I was thinking of implementing a thumbs system, but mine would require a registration

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.