如何解决 Cannot load such file openssl 错误?

Adi*_*rma 3 ruby openssl

我尝试运行 gem install bundler 并收到此错误,已经尝试了 SO 上的所有链接,请帮助。

Ignoring eventmachine-1.2.7 because its extensions are not built. Try: gem pristine eventmachine --version 1.2.7
Ignoring nokogiri-1.10.10 because its extensions are not built. Try: gem pristine nokogiri --version 1.10.10
Ignoring oj-3.7.12 because its extensions are not built. Try: gem pristine oj --version 3.7.12
Ignoring yaji-0.3.6 because its extensions are not built. Try: gem pristine yaji --version 0.3.6
Ignoring yaji-0.3.5 because its extensions are not built. Try: gem pristine yaji --version 0.3.5
ERROR:  Loading command: install (LoadError)
    cannot load such file -- openssl
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass
Run Code Online (Sandbox Code Playgroud)

Adi*_*rma 10

卸载 ruby​​ 和 opensssl,然后运行以下命令:

rvm reinstall 2.2.9 --with-openssl-dir=$HOME/.rvm/usr
Run Code Online (Sandbox Code Playgroud)