简体   繁体   English

Rails 部署失败,因为 SSHKit 命令失败

[英]Rails deploy fails, as SSHKit command failed

The latest in rails 6 deployment problems when compiling javascript assets.编译 javascript 资产时最新的 rails 6 部署问题。 The error points to错误指向

    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

I have no clue what is going on here.我不知道这里发生了什么。 How should this be addressed?应该如何解决?

If asset precompilation is working on the remote server directly then it's time to look at what conditions SSHKit sets up when capistrano connects to the server:如果资产预编译直接在远程服务器上工作,那么是时候看看当 capistrano 连接到服务器时 SSHKit 设置了什么条件:

  • Is there a timeout on the ssh connection? ssh 连接是否超时?
  • What environment variables are set when you SSH directly vs in the SSHKit session? SSH 直接与 SSHKit session 相比,设置了哪些环境变量?

There is a Capistrano —-trace option that can help you reveal more info.有一个 Capistrano ----trace 选项可以帮助您揭示更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 capistrano deploy SSHKit :: Command :: Failed:捆绑包退出状态 - capistrano deploy SSHKit::Command::Failed: bundle exit status Rails Capistrano - SSHKit :: Command :: Failed:bundle退出状态:16 - Rails Capistrano - SSHKit::Command::Failed: bundle exit status: 16 Capistrano Rails 6 - Net::SSH 用户部署身份验证失败(SSHKit::Runner::ExecuteError) - Capistrano Rails 6 - Net::SSH Authentication failed for user deploy (SSHKit::Runner::ExecuteError) Capistrano无法通过SSHKit :: Command :: Failed进行deploy:assets:precompile失败:rake退出状态:1 - Capistrano failing at deploy:assets:precompile with SSHKit::Command::Failed: rake exit status: 1 Rails Capistrano的资产失败:预编译SSHKIT - Rails Capistrano fails on assets:precompile SSHKIT Capistrano:SSHKit :: Command :: Failed:捆绑包退出状态:1 - Capistrano: SSHKit::Command::Failed: bundle exit status: 1 SSHKit :: Command :: Failed:bundle stdout:没有为capistrano编写任何内容 - SSHKit::Command::Failed: bundle stdout: Nothing written for capistrano Rails 部署到 Heroku 失败 - Rails deploy to Heroku fails 卡皮斯特拉诺宝石。 编译错误。 SSHKit::Command::Failed:rake 退出状态:1 - Capistrano gem. Compiling error. SSHKit::Command::Failed: rake exit status: 1 Heroku 部署上的 Rails 配置失败 - Rails configuration failed on Heroku deploy
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM