Help us understand the problem. What is going on with this article?

Yosemiteに変えたらgem installできなくなった件

More than 3 years have passed since last update.

追記:El Capitanにバージョンアップして当該の症状が出た場合にも、同じ方法で解決できたとのコメントをいただきました。

「またか」という感じですが、OSXをYosemiteにバージョンアップしたらgemの調子がおかしなことになりました。使っていたバージョンは、rbenvでインストールした2.1.1です。

terminal
ERROR:  Loading command: install (LoadError)
    dlopen(/Users/yoshiyuki/.rbenv/versions/2.1.1/lib/ruby/2.1.0/x86_64-darwin13.0/openssl.bundle, 9): Symbol not found: _SSLv2_client_method
  Referenced from: /Users/yoshiyuki/.rbenv/versions/2.1.1/lib/ruby/2.1.0/x86_64-darwin13.0/openssl.bundle
  Expected in: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
 in /Users/yoshiyuki/.rbenv/versions/2.1.1/lib/ruby/2.1.0/x86_64-darwin13.0/openssl.bundle - /Users/yoshiyuki/.rbenv/versions/2.1.1/lib/ruby/2.1.0/x86_64-darwin13.0/openssl.bundle
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass

こんな感じのエラーです。なんかopensslが見当たらなくなっているみたい。
解決策は、

1. homebrew経由でopenssl入れてパスの変更
2. rbenvのrubyを再インストール

これでいけました。

terminal
$ brew install openssl
$ brew link openssl --force
$ rbenv uninstall 2.1.1
$ rbenv install 2.1.1

同じ症状でお困りの方いらっしゃいましたら、是非一度お試しください。

YoshiyukiKato
新米社会人∩(´;ヮ;`)∩
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした