Last Updated: May 17, 2017
· nrutman
Nathan 2

Useful Capistrano Settings

I love Capistrano. It has changed my life. But with great power comes great responsibility, and the documentation for Capistrano can be exhausting. Here are some simple configuration settings that I've found useful:

default_run_options[:pty] = true

If you're getting those pesky, "stdin: is not a tty" errors throughout your deployment, try adding the above to the deploy script. Good-bye errors!

set :normalize_asset_timestamps, false

By default, Capistrano tries to "touch" normalized asset directories like "stylesheets" and "javascripts". If you're not using the standard Ruby on Rails scaffolding (we use PHP almost exclusively) you will get warnings that these directories don't exist. This variable will tell Capistrano to forgo touching those asset files.

set :copy_exclude, [".git/", "archives/"]

Ever have files in your repo that you don't want to copy in the deploy? Use the above to exclude any number of files / folders from a given deployment.

Say Thanks

1 Response
Add your response


In Capistrano 3 enable pty with:
set :pty, true

over 1 year ago ·