cap production deploy すると Gem::MissingSpecError : “Could not find ‘ed25519’ (~> 1.2) エラー

ちょっと間を開けて cap production deploy すると、いつもエラーに遭遇する…

The deploy has failed with an error: unsupported key type `ssh-ed25519'
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::MissingSpecError : "Could not find 'ed25519' (~> 1.2) among 63 total gem(s)
Checked in 'GEM_PATH=/Users/nakanin/.gem/ruby/2.7.0:/Users/nakanin/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0', execute `gem env` for more information"

ログに記載がある下記ページを見ると、Gemfile に追加が必要らしい。

https://github.com/net-ssh/net-ssh/issues/565

gem 'ed25519', '>= 1.2', '< 2.0'
gem 'bcrypt_pbkdf', '>= 1.0', '< 2.0'

上記を追加し、bundle install すると、cap production deploy できるようになった。

以前より ssh 接続パスワードの入力を求められる回数が増えた気がするが、まぁたまにしか実行しないので気にしないでおこう。

コメントを残す