mattbrictson/airbrussh

Console error only when using Spring

Closed this issue · 1 comments

I have a Capistrano task that does this:

        execute :sudo, "touch /tmp/hello"

I execute with cap stage utils:my_task

If I don't use the Spring Rails application reloader, no problem. If I do use it, I get:

from /home/jason/.rvm/gems/ruby-2.7.3@rails61/gems/airbrussh-1.4.0/lib/airbrussh/console.rb:27:in `print_line'
/home/jason/.rvm/gems/ruby-2.7.3@rails61/gems/airbrussh-1.4.0/lib/airbrussh/console.rb:65:in `console_width': undefined method `winsize' for nil:NilClass (NoMethodError)

Apparently IO.console is null when I use the Spring preloader.

Resolved the problem by putting set :format_options, truncate: false in deploy.rb. See this thread capistrano/capistrano#1999