Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (LoadError)
  Referenced from: /Users/username/.rbenv/versions/2.5.1/lib/ruby/2.5.0/x86_64-darwin18/digest/md5.bundle
  Reason: image not found-/Users/username/.rbenv/versions/2.5.1/lib/ruby/2.5.0/x86_64-darwin18/digest/md5.bundle

I have this error in the terminal and I can't use any commands.
I think that the section that comes to mind is that we updatedHomebrew

※ I don't know if the code is necessary for this question. If it becomes redundant, I think that it is not good and only an error text is posted, so I will post it if necessary.

  • Answer # 1

    To guess from the situation

    Has 2.5.1 installed previously using rbenv/ruby-build

    Upgrading packages with Homebrew increased OpenSSL version

    An error occurred because the version of OpenSSL that ruby ​​referred to was lost

    The solution is to reinstall ruby ​​with rbenv.