• Stars
    star
    199
  • Rank 196,105 (Top 4 %)
  • Language
    Ruby
  • License
    MIT License
  • Created about 11 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Fast asset compilation and deployment for your Rails app

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'
  # Capistrano v3.8+ should use '~> 1.2.0'
  gem 'capistrano-local-precompile', '~> 1.2.0', require: false
end

Then add the following line to your Capfile:

require 'capistrano/local_precompile'

Remove the following line from your Capfile:

require 'capistrano/rails/assets'

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"

Capistrano supports dry run mode. In that case the rsync command will not actually be run but only shown in stdout:

cap production deploy --dry-run

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) 2019 Steve Agalloco / Tom Caflisch. See LICENSE for detail

More Repositories

1

silencer

Easily suppress the Rails logger
Ruby
159
star
2

instapaper

Ruby Client for Instapaper's Full API
Ruby
95
star
3

awesome-dropwizard

Shell
92
star
4

bower

Bower integration for your ruby/rails apps.
Ruby
47
star
5

airbrake-api

Airbrake API Ruby Client
Ruby
44
star
6

tophat

TopHat is a set of view helpers to keep your Rails layouts and views DRY.
Ruby
29
star
7

alfred-vpn

Alfred 3 workflow to connect/disconnect from VPNs
JavaScript
23
star
8

bluepill-examples

Example usages of bluepill I've found on the web
Ruby
18
star
9

current-cli

See what language versions are configured in your current environment
JavaScript
16
star
10

watch-later-api

YouTube Watch Later playlist Workflow integration
Ruby
16
star
11

omniauth-dropbox

Dropbox Strategy for OmniAuth 1.0
Ruby
15
star
12

pow_proxy

A simple rack-based proxy that allows you to run your node apps through Pow.
Ruby
12
star
13

alfred-ipaddress

Alfred 3 workflow to display internal/external IP addresses
JavaScript
10
star
14

awesome-ratpack

Shell
10
star
15

domainr

Ruby wrapper for the Domainr API
Ruby
10
star
16

omniauth-instapaper

OmniAuth 1.0 Strategy for Instapaper Full API
Ruby
9
star
17

rvmify

get up and running quickly with rvm, gemsets and bundler
Ruby
7
star
18

mongo_mapper_generators

Generators for use with the MongoMapper rubygem.
Ruby
6
star
19

nativize.css

Stylesheet defaults to help electron apps feel native
CSS
6
star
20

css-architectures

5
star
21

jsonwhois

WHOIS over HTTP, served as JSON
Ruby
5
star
22

yql-query

A simple query builder for YQL
Ruby
5
star
23

arr-force

Faraday Middleware to ensure certain keys are converted to arrays
Ruby
4
star
24

itunes-charts

A simple rubygem to retrieve itms charts from apple.com
Ruby
4
star
25

omniauth-netflix

Netflix Strategy for OmniAuth 1.0
Ruby
4
star
26

em-logger

experimental logger class for EventMachine
Ruby
4
star
27

rack-lettering

Rack Middleware for inserting Lettering.js style syntax into a response body
Ruby
4
star
28

scar

Soundcloud artwork downloader
Go
3
star
29

mog

Mog API
Ruby
3
star
30

eager

Ruby
2
star
31

install-scripts

Bash scripts for commonly installed items
Ruby
2
star
32

old-dotfiles

Everyone has them, these are mine
Shell
2
star
33

go-opengraph-server

Go
2
star
34

go-oembed-server

Go
2
star
35

gstock

A simple API wrapper for google finance stock quotes.
Ruby
2
star
36

jekyll-atom

atom feeds for jekyll
1
star
37

rails-template

My preferred default rails stack
Ruby
1
star
38

.js

My .js files
JavaScript
1
star
39

negatives

Ruby
1
star
40

viewqueue

Experimenting with node and phantom.js
JavaScript
1
star
41

roe

A simple Ruby oEmbed client
Ruby
1
star
42

sshpeek

Simple command-line tool for displaying ssh config info
Ruby
1
star
43

websockets-example

JavaScript
1
star