7

when I try to install cocoapods on my mac, I installed ruby, as below:

$ ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]

but when I typed command sudo gem install cocoapods, it shows the error:

ERROR:  Loading command: install (LoadError)
    dlopen(/usr/local/Cellar/ruby/2.3.1/lib/ruby/2.3.0/x86_64-darwin15/openssl.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /usr/local/Cellar/ruby/2.3.1/lib/ruby/2.3.0/x86_64-darwin15/openssl.bundle
  Reason: image not found - /usr/local/Cellar/ruby/2.3.1/lib/ruby/2.3.0/x86_64-darwin15/openssl.bundle

ERROR:  While executing gem ... (NoMethodError)
    undefined method invoke_with_build_args' for nil:NilClass

$ ruby reinstall
ruby: No such file or directory -- reinstall (LoadError)

I am new to ruby, maybe it says missing openssl.bundle?

Holger Just
  • 52,918
  • 14
  • 115
  • 123
MichaelMao
  • 528
  • 6
  • 15
  • 1
    (esp. running `brew remove openssl; brew install openssl` should do the trick) – Holger Just Aug 20 '16 at 08:15
  • Wow, it works! the error has gone ,thanks! while install cocopods, there is a error`ERROR: While executing gem ... (TypeError) no implicit conversion of nil into String ` after `Successfully installed colored-1.2 Fetching: xcodeproj-1.2.0.gem (100%)` – MichaelMao Aug 20 '16 at 08:57
  • try: brew upgrade ruby – walter Sep 20 '20 at 12:48

0 Answers0