【发布时间】:2023-01-30 04:11:41
【问题描述】:
编译 javascript 资产时最新的 rails 6 部署问题。错误指向
1: from /Users/deploy/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sshkit-1.21.2/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute'
/Users/deploy/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/sshkit-1.21.2/lib/sshkit/runners/parallel.rb:15:in
'rescue in block (2 levels) in execute': Exception while executing as deploy@16.17.18.2: rake exit status: 1
(SSHKit::Runner::ExecuteError)
[...]
Caused by:
SSHKit::Command::Failed: rake exit status: 1
rake stdout: yarn install v1.22.17
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 25.51s.
Compiling...
Compilation failed:
rake stderr: Nothing written
Tasks: TOP => deploy:assets:precompile
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing as deploy@16.17.18.2: rake exit status: 1
rake stdout: yarn install v1.22.17
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 25.51s.
Compiling...
Compilation failed:
rake stderr: Nothing written
我不知道这里发生了什么。应该如何解决?
【问题讨论】:
-
看起来您的远程部署过程隐藏了错误。如果您自己通过 SSH 部署@... 并直接运行
rake assets:precompile,会发生什么情况? -
这个过程自然地在 yarn install v1.22.17 [1/4] 解决包...成功已经是最新的。编译...` 但实际上完成了。