読者です 読者をやめる 読者になる 読者になる

DELAEMON BLOG

Live as if you were to die tomorrow. Learn as if you were to live forever.

gem install sinatra ~ Symbol not found: _SSLv2_client_method ~ @OS X

sinatraをインストールしようとしたら以下のエラー

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

rubyを再インストールする

$ sudo rbenv install 2.2.2

再度 sinatra install

$ sudo gem install sinatra
Password:
Fetching: rack-protection-1.5.3.gem (100%)
Successfully installed rack-protection-1.5.3
Fetching: tilt-2.0.1.gem (100%)
Successfully installed tilt-2.0.1
Fetching: sinatra-1.4.6.gem (100%)
Successfully installed sinatra-1.4.6
Parsing documentation for rack-protection-1.5.3
Installing ri documentation for rack-protection-1.5.3
Parsing documentation for tilt-2.0.1
Installing ri documentation for tilt-2.0.1
Parsing documentation for sinatra-1.4.6
Installing ri documentation for sinatra-1.4.6
Done installing documentation for rack-protection, tilt, sinatra after 272 seconds
3 gems installed