'An error occurred when executing the “'cache:clear --no-warmup'” command' with capifony

一笑奈何 提交于 2019-12-01 12:00:59

Debugging Capistrano deployments:

A little trick i came up with to ease debugging is to use an environment variable to switch verbose output and some extra information on and off.

You can add something like this to your deploy.rb (extend or shorten if you like)...

unless ENV['_DEBUG'].nil?
    puts "Ruby Version                      => #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"
    puts "OpenSSL::Version                  => #{OpenSSL::OPENSSL_VERSION}"
    puts "Net::SSH::Version::CURRENT        => #{Net::SSH::Version::CURRENT}"
    puts "Net::SSH -> Local platform        => #{Net::SSH::Authentication::PLATFORM}"
    puts "Remote Whoami                     => #{capture 'whoami'}"
    puts "umask on Server                   => #{capture 'umask'}"
    puts "$SHELL                            => #{capture 'echo $SHELL'}"
    puts "$BASH_VERSION                     => #{capture 'echo $BASH_VERSION'}"
    puts "Interactive Shell - Test: $PS1    => #{capture 'if [ -z "$PS1" ]; then echo no; else echo yes; fi'}"

    logger.level =          Logger::MAX_LEVEL
    ssh_options[:verbose] = :debug 
end

Now execute:

_DEBUG=1 cap deploy
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!