A Ruby gem that automatically syncs Rails Asset Pipeline compiled assets to cloud storage like Amazon S3, Google Cloud Storage, and Azure Blob.
Asset Sync is a Ruby gem that automatically synchronizes assets compiled by the Rails Asset Pipeline to cloud storage services like Amazon S3, Google Cloud Storage, and Azure Blob. It solves the problem of efficiently serving static assets in production by uploading only changed files after precompilation, enabling CDN usage and reducing server load.
Rails developers deploying applications to platforms like Heroku or any environment where static assets need to be served from a CDN or cloud storage.
Developers choose Asset Sync for its seamless integration with Rails, support for multiple cloud providers, and efficient upload mechanism that only transfers modified assets, saving time and bandwidth.
Synchronises Assets between Rails and S3
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Hooks directly into Rails' assets:precompile task, uploading assets immediately after compilation without manual commands, as highlighted in the installation and configuration sections.
Supports AWS S3, Google Cloud, Azure, Backblaze B2, and Rackspace via configurable Fog providers, allowing deployment across various cloud storage services.
Uploads only changed files and can delete unused remote assets, optimizing bandwidth and storage, with options like existing_remote_files control.
Automatically replaces assets with gzip or Brotli compressed versions and sets correct Content-Encoding headers, enhancing CDN performance as described in the compression section.
Enables multi-threaded uploads with configurable thread counts via concurrent_uploads, significantly speeding up sync for large asset sets.
Requires installing specific Fog provider gems (e.g., fog-aws, fog-google) and careful configuration of environment variables or initializers, which can be error-prone and add overhead.
As admitted in the README, syncing Webpacker assets doesn't properly check remote existence, leading to redundant uploads on every precompile despite configuration efforts.
Tightly coupled with Rails Asset Pipeline, making it unsuitable for other frameworks or custom asset management systems without significant adaptation.
Offers multiple configuration methods (env vars, YAML, initializer) that can lead to inconsistencies and maintenance challenges in complex deployments.