Rails 5.1 capistrano卡在webpacker编译资产上

时间:2017-08-07 20:25:15

标签: ruby-on-rails relay webpacker

我正在尝试使用capistrano部署rails 5.1应用程序,它似乎停留在编译资产上:

02:38 deploy:assets:precompile
  01 $HOME/.rbenv/bin/rbenv exec bundle exec rake assets:precompile
  01 yarn install v0.27.5
  01 [1/4] Resolving packages...
  01 [2/4] Fetching packages...
  01 warning fsevents@1.1.1: The platform "linux" is incompatible with this module.
  01 info "fsevents@1.1.1" is an optional dependency and failed compatibility check. Excluding it from installation.
  01 [3/4] Linking dependencies...
  01 [4/4] Building fresh packages...
  01 Done in 48.92s.
  01 Webpacker is installed  
  01 Using /project_name/releases/20170807195158/config/webpack/paths.yml file for setting up webpack paths
  01 Compiling webpacker assets 

没有任何错误,它会在那里待上几个小时。如果我检查节点进程在远程服务器上执行此操作,它表示它使用100%的CPU大约5分钟然后该过程似乎被杀死但它仍然说“编译资产”。

1 个答案:

答案 0 :(得分:0)

似乎执行bundle exec rake资产:当有多个资产失败时,在远程执行预编译。

解决方案是在本地编译资产,然后将它们rsync到远程服务器。