I have a rails application with Rails 7 and Ruby 3 support, which is working well in my development machine with Ubuntu 22.04, ruby 3.0.2p107 and Rails 7.0.2.3.
Now I'm trying to set up Capistrano (version 3.17.0) in order to deploy the rails app to a server with Ubuntu 22.04. However, I'm unable to do so due to the following error:
SSHKit::Runner::ExecuteError: Exception while executing as username@server: rsa#set_key= is incompatible with OpenSSL 3.0
It seems that Capistrano is no compatible with OpenSSL 3.0, which is the default OpenSSL library in Ubuntu 22.04. I guess it's a bug, but I did not find any post reporting it. I did not find any workaround either.
I tried to fix the issue by installing OpenSSL 1.1.1 but the rails app still uses OpenSSL 3. Perhaps a solution could be to reinstall ruby 3 with OpenSSL 1.1.1 using the --with-openssl-dir option.
Any suggestion?