Read more

How to make Capistrano not truncate server output

Arne Hartherz
April 26, 2018Software engineer at makandra GmbH

By default, Capistrano truncates server responses and places an ellipsis at the end of lines that are longer than your terminal. Error messages are never truncated.

Illustration online protection

Rails professionals since 2007

Our laser focus on a single technology has made us a leader in this space. Need help?

  • We build a solid first version of your product
  • We train your development team
  • We rescue your project in trouble
Read more Show archive.org snapshot

While this can be helpful to make deployment output appear less noisy, it also hides information that could be helpful.
I believe you should prefer knowing what is going on, even if causes a few extra lines of output.

Capistrano by default uses Airbrussh which is where truncation happens. To disable truncation globally, place this into your deploy.rb:

set :format_options, truncate: false

Instead of rm -fr /var/www/my-fancy-project/r… you'll now see /var/www/my-fancy-project/releases/20180426080000/public/assets and know what is actually happening.

Posted by Arne Hartherz to makandra dev (2018-04-26 10:07)