Aditya Verma
Aditya Verma

Reputation: 518

How to resolve Cannot load such file openssl error?

I tried running gem install bundler and got this error, have tried all the link on SO already, please help.

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

Upvotes: 3

Views: 6900

Answers (1)

Aditya Verma
Aditya Verma

Reputation: 518

Uninstall ruby and opensssl and then run this:

rvm reinstall 2.2.9 --with-openssl-dir=$HOME/.rvm/usr

Upvotes: 12

Related Questions