状況
長らく触っていなかったRails5のプロジェクトをデプロイしようとしたら、下記のエラーでデプロイできなかった。
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)
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."
(Backtrace restricted to imported tasks)
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."
Tasks: TOP => rbenv:validate
(See full trace by running task with --trace)
解決方法
development用にこちらを追加し bundle install
したら解決しました。
diff --git a/Gemfile b/Gemfile
index 0898d25..067fd75 100644
--- a/Gemfile
+++ b/Gemfile
@@ -68,6 +68,9 @@ group :development do
group :development do
gem 'capistrano-rails'
gem 'capistrano-rbenv'
gem 'capistrano-bundler'
gem 'capistrano-yarn'
gem 'capistrano-passenger', '>= 0.1.1'
+ gem 'ed25519'
+ gem 'bcrypt_pbkdf'
+