1

我正在尝试使用 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 分钟,然后该进程似乎被杀死,但它仍然显示“正在编译资产”。

4

1 回答 1

0

似乎在有多个资产时在远程执行 bundle exec rake assets:precompile 会失败。

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

于 2017-08-21T15:39:29.873 回答