ruby-on-rails - Rails 应用程序中的 Capistrano 部署错误

标签 ruby-on-rails ruby capistrano

我在 Rails 应用程序中执行 cap production deploy 时遇到此错误
我的网络 ssh 版本是 5.0.2
任何人都可以帮我解决这个问题。
我的服务器是彪马

#<Thread:0x00007fe400cfb5e8@/Users/synup/.rvm/gems/ruby-2.5.1/gems/sshkit-1.17.0/lib/sshkit/runners/parallel.rb:10 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
    26: from /Users/synup/.rvm/gems/ruby-2.5.1/gems/sshkit-1.17.0/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
    25: from /Users/synup/.rvm/gems/ruby-2.5.1/gems/sshkit-1.17.0/lib/sshkit/backends/abstract.rb:29:in `run'
    24: from /Users/synup/.rvm/gems/ruby-2.5.1/gems/sshkit-1.17.0/lib/sshkit/backends/abstract.rb:29:in `instance_exec'
    23: from /Users/synup/.rvm/gems/ruby-2.5.1/gems/capistrano-rvm-0.1.2/lib/capistrano/tasks/rvm.rake:9:in `block (3 levels) in <top (required)>'
    22: from /Users/synup/.rvm/gems/ruby-2.5.1/gems/sshkit-1.17.0/lib/sshkit/backends/abstract.rb:64:in `capture'
    21: from /Users/synup/.rvm/gems/ruby-2.5.1/gems/sshkit-1.17.0/lib/sshkit/backends/abstract.rb:145:in `create_command_and_execute'
    20: from /Users/synup/.rvm/gems/ruby-2.5.1/gems/sshkit-1.17.0/lib/sshkit/backends/abstract.rb:145:in `tap'
    19: from /Users/synup/.rvm/gems/ruby-2.5.1/gems/sshkit-1.17.0/lib/sshkit/backends/abstract.rb:145:in `block in create_command_and_execute'
    18: from /Users/synup/.rvm/gems/ruby-2.5.1/gems/sshkit-1.17.0/lib/sshkit/backends/netssh.rb:129:in `execute_command'
    17: from /Users/synup/.rvm/gems/ruby-2.5.1/gems/sshkit-1.17.0/lib/sshkit/backends/netssh.rb:176:in `with_ssh'
    16: from /Users/synup/.rvm/gems/ruby-2.5.1/gems/sshkit-1.17.0/lib/sshkit/backends/connection_pool.rb:59:in `with'
    15: from /Users/synup/.rvm/gems/ruby-2.5.1/gems/sshkit-1.17.0/lib/sshkit/backends/connection_pool.rb:59:in `call'
    14: from /Users/synup/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.0.2/lib/net/ssh.rb:246:in `start'
    13: from /Users/synup/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.0.2/lib/net/ssh/authentication/session.rb:71:in `authenticate'
    12: from /Users/synup/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.0.2/lib/net/ssh/authentication/session.rb:71:in `each'
    11: from /Users/synup/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.0.2/lib/net/ssh/authentication/session.rb:85:in `block in authenticate'
    10: from /Users/synup/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.0.2/lib/net/ssh/authentication/methods/publickey.rb:19:in `authenticate'
     9: from /Users/synup/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.0.2/lib/net/ssh/authentication/key_manager.rb:119:in `each_identity'
     8: from /Users/synup/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.0.2/lib/net/ssh/authentication/key_manager.rb:119:in `each'
     7: from /Users/synup/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.0.2/lib/net/ssh/authentication/key_manager.rb:122:in `block in each_identity'
     6: from /Users/synup/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.0.2/lib/net/ssh/authentication/methods/publickey.rb:20:in `block in authenticate'
     5: from /Users/synup/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.0.2/lib/net/ssh/authentication/methods/publickey.rb:62:in `authenticate_with'
     4: from /Users/synup/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.0.2/lib/net/ssh/authentication/key_manager.rb:142:in `sign'
     3: from /Users/synup/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.0.2/lib/net/ssh/key_factory.rb:44:in `load_private_key'
     2: from /Users/synup/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.0.2/lib/net/ssh/key_factory.rb:53:in `load_data_private_key'
     1: from /Users/synup/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.0.2/lib/net/ssh/key_factory.rb:113:in `classify_key'
/Users/synup/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.0.2/lib/net/ssh/authentication/ed25519_loader.rb:21:in `raiseUnlessLoaded': OpenSSH keys only supported if ED25519 is available (NotImplementedError)
net-ssh requires the following gems for ed25519 support:
 * ed25519 (>= 1.2, < 2.0)
 * bcrypt_pbkdf (>= 1.0, < 2.0)
cap aborted!
NotImplementedError: OpenSSH keys only supported if ED25519 is available
net-ssh requires the following gems for ed25519 support:
 * ed25519 (>= 1.2, < 2.0)
 * bcrypt_pbkdf (>= 1.0, < 2.0)
See https://github.com/net-ssh/net-ssh/issues/565 for more information
Gem::LoadError : "ed25519 is not part of the bundle. Add it to your Gemfile."

最佳答案

对我来说只是在终端上执行

ssh-add
这奏效了。

关于ruby-on-rails - Rails 应用程序中的 Capistrano 部署错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57968022/

相关文章:

Ruby 版本在终端和 bash 中有所不同

ruby-on-rails - 在rails控制台中加载Capistrano的环境

ruby-on-rails - PG::ConnectionBad:无法连接到服务器:连接被拒绝(Ubuntu 16.04、Rails 5、Capistrano)

ruby-on-rails - 如何期待 'render template' 错误

ruby-on-rails - 预编译时从 js.erb 文件访问模型

ruby-on-rails - Ruby on Rails ActionMailer SMTP 设置 mTLS

ruby-on-rails - 如何使用 redis-rb gem 告诉 redis 已经消失

ruby-on-rails - Rails 缺少必需的键 : [:id]

Ruby:1 美元是什么意思?

ruby - 如何使用 ruby​​ 1.8.7 安装 capistrano v2.13.5?