Coder Social home page Coder Social logo

s3_asset_sync's Introduction

S3 Asset Sync

This gem provides a simple way of syncronizing your Rails 4 assets with an AWS S3 Bucket.

Installation

gem 's3_asset_sync'

Configuration

Run the following command to generate a configuration file in your Rails /config/initializers folder.

rake s3_asset_sync:setup

Edit that file and replace the default values with your own AWS details.

Usage

By default, assets will be syncronized automatically after precompilation:

rake assets:precompile

If this is not the desired behaviour then simply edit the configuration value as below:

Rails.application.config.s3_asset_sync.run_after_precompile = false

To manually syncronize assets run:

rake assets:sync_to_s3

Deleting Assets

Expired assets won’t be automatically removed from S3 as some nodes within a load balanced setup may temporarily require older assets. To delete expired assets from S3 run:

rake assets:purge_s3

s3_asset_sync's People

Contributors

neilturner77 avatar mtmail avatar

Stargazers

Jose Valencia avatar Mark Oleson avatar Junho Cha avatar Hugh Evans avatar  avatar Zaur Amikishiyev avatar Leonid Kovnatskiy avatar Jose Luis Salas avatar  avatar

Watchers

Pritesh avatar  avatar

Forkers

figure53 mtmail izea

s3_asset_sync's Issues

templates are not part of the gem package

When I manually open the https://rubygems.org/downloads/s3_asset_sync-0.1.2.gem (a gzip archive) it is missing the files from the templates directory.

Thus rake s3_asset_sync:setup fails

cp /Users/abc/.rvm/gems/ruby-2.1.6/gems/s3_asset_sync-0.1.2/templates/s3_asset_sync.rb config/initializers/s3_asset_sync.rb
rake aborted!
find /Users/abc/.rvm/gems/ruby-2.1.6/gems/s3_asset_sync-0.1.2/
/Users/abc/.rvm/gems/ruby-2.1.6/gems/s3_asset_sync-0.1.2/
/Users/abc/.rvm/gems/ruby-2.1.6/gems/s3_asset_sync-0.1.2//lib
/Users/abc/.rvm/gems/ruby-2.1.6/gems/s3_asset_sync-0.1.2//lib/s3_asset_sync
/Users/abc/.rvm/gems/ruby-2.1.6/gems/s3_asset_sync-0.1.2//lib/s3_asset_sync/railtie.rb
/Users/abc/.rvm/gems/ruby-2.1.6/gems/s3_asset_sync-0.1.2//lib/s3_asset_sync/version.rb
/Users/abc/.rvm/gems/ruby-2.1.6/gems/s3_asset_sync-0.1.2//lib/s3_asset_sync.rb
/Users/abc/.rvm/gems/ruby-2.1.6/gems/s3_asset_sync-0.1.2//lib/tasks
/Users/abc/.rvm/gems/ruby-2.1.6/gems/s3_asset_sync-0.1.2//lib/tasks/s3_asset_sync.rake
/Users/abc/.rvm/gems/ruby-2.1.6/gems/s3_asset_sync-0.1.2//MIT-LICENSE
/Users/abc/.rvm/gems/ruby-2.1.6/gems/s3_asset_sync-0.1.2//Rakefile
/Users/abc/.rvm/gems/ruby-2.1.6/gems/s3_asset_sync-0.1.2//README.rdoc

(as workaround I will just download the template file from git manually)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.