0

I'm trying to install a new gem (gem install lunchy), but am getting the following error due to the ssl certificate:

ERROR: Loading command: install (LoadError) dlopen(/usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/2.0.0/x86_64-darwin12.3.0/openssl.bundle, 9): Symbol not found: _SSLv2_client_method Referenced from: /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/2.0.0/x86_64-darwin12.3.0/openssl.bundle Expected in: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib in /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/2.0.0/x86_64-darwin12.3.0/openssl.bundle - /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/2.0.0/x86_64-darwin12.3.0/openssl.bundle ERROR: While executing gem ... (NoMethodError) undefined method 'invoke_with_build_args' for nil:NilClass

I've tried a number of fixes:

Tried gem update --system per this answer bundle install fails with SSL certificate verification error but get the same error on that command.

Tried brew install openssl followed by brew link openssl --force per this question but to no avail: OpenSSL error installing ruby 2.0.0-p195 on Mac with rbenv

Even tried reinstalling rbenv and ruby but that didn't work either, still get the same error.

Community
  • 1
  • 1
YPCrumble
  • 26,610
  • 23
  • 107
  • 172

1 Answers1

2

The Ruby being executed in this error is not one installed by rbenv, but by Homebrew.

If you're trying to use rbenv, maybe run brew uninstall ruby and/or check the output of echo $PATH to make sure that ~/.rbenv/shims is at the start.

Tim Moore
  • 8,958
  • 2
  • 23
  • 34