Capistrano 3 assets:precompile takes hours. Stops at css file

前端 未结 2 1354
一生所求
一生所求 2021-01-18 05:38

Just as it says, I can\'t get capistrano 3 to do assets:precompile correctly. Even after hours, it still says writing to the .css file on the serv

相关标签:
2条回答
  • 2021-01-18 05:48
    1. Is this a Windows instance? Windows instances by default use the IE6 Javascript/CSS engine which is PATHETICALLY SLOW and accurately reflects the problem that you are facing.

    2. If it is a Linux instance, try adding the uglifier and therubyracer gems in your Gemfile, and also make sure to install Firefox/libv8

    0 讨论(0)
  • 2021-01-18 05:51

    I had a similar issue where Capistrano 3 freezes on assets:precompile.

    For me it turned out that it was an SSH problem due to the prolonged time it takes to precompile assets on production! Especially if the server memory and CPU specs are not too high.

    Although my connection to the production server was pretty fast and reliable, it seemed that my SSH client just gave up reading output from SSHD server after a certain amount of time.

    The Fix

    Add the following in /etc/ssh/sshd_config on production server to keep connection with SSH client alive:

    ClientAliveInterval 30
    ClientAliveCountMax 10
    

    This fixed the issue and now Capistrano 3 completes deployment with no problems.

    0 讨论(0)
提交回复
热议问题