LoginSignup
3
0

More than 3 years have passed since last update.

Ruby2.3.1でgemがインストールできない(cannot load such file -- openssl)

Posted at

cannot load such file -- openssl

rvmで2.3.1をインストールし、gem install xxx を実行すると以下のエラー。

ERROR:  Loading command: install (LoadError)
    cannot load such file -- openssl
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass

何らかの原因でOpenSSLが読み込めないのが原因らしい。

解決法

自分の場合は、rvmのパッケージでopensslをインストールして、それを参照するようにしたら動いた。

rvm pkg install openssl
rvm reinstall ruby-2.3.1 --with-openssl-dir=$rvm_path/usr
3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0