Skip to content

tbk303/capistrano-local-precompile

This branch is 4 commits ahead of, 14 commits behind stve/capistrano-local-precompile:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

32f3cee · Apr 4, 2018

History

34 Commits
Apr 4, 2018
May 24, 2017
Sep 16, 2013
Sep 16, 2013
Aug 31, 2014
May 24, 2017
Sep 16, 2013
Sep 18, 2017
Sep 16, 2013
Sep 16, 2013
Sep 16, 2013
May 24, 2017
Sep 16, 2013
Sep 18, 2017

Repository files navigation

Capistrano Local Precompile

If your Rails apps are anything like mine, one of the slowest parts of your deployment is waiting for asset pipeline precompilation. It's sometimes so slow, it's painful. So I went searching for some solutions. turbo-sprockets helped, but it's not a silver bullet. This gem isn't a silver bullet either, but it can help. Capistrano Local Precompile takes a different approach. It builds your assets locally and rsync's them to your web server(s).

Usage

Add capistrano-local-precompile to your Gemfile:

group :development do
  # Capistrano v2 should use '~> 0.0.5'
  # Capistrano v3 should use '~> 1.0.0'
  gem 'capistrano-local-precompile', '~> 1.0.0', require: false
end

Then add the following line to your Capfile:

require 'capistrano/local_precompile'

Here's the full set of configurable options:

set :precompile_env             # default: fetch(:rails_env) || 'production'
set :assets_dir                 # default: "public/assets"
set :rsync_cmd                  # default: "rsync -av --delete"

Acknowledgement

This gem is derived from gists by uhlenbrock and keighl.

Contributing

Pull requests welcome: fork, make a topic branch, commit (squash when possible) with tests and I'll happily consider.

Copyright

Copyright (c) 2017 Steve Agalloco / Tom Caflisch. See LICENSE for detail

About

Fast asset compilation and deployment for your Rails app

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%