我正在尝试使用 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 [email protected] /cdn-cgi/l/email-protection: The platform "linux" is incompatible with this module.
01 info "[email protected] /cdn-cgi/l/email-protection" 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 分钟,然后该进程似乎被终止,但它仍然显示“正在编译资产”。
当有多个资产时,在远程执行bundle exec rake assets:precompile 似乎会失败。
解决方案是在本地编译资产,然后将它们同步到远程服务器。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)