2

I was working on trying to fix a bug I was encountering in Dragonfly with my images not having a decoding delegate, and one of the solutions I found was to remove Imagemagick and then reinstall from source. Since then whenever I try to start my rails server, bundle install, or add any ruby gems I get the following error message.

/Users/username/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': dlopen(/Users/username/.rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-darwin18.0/openssl.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (LoadError)
  Referenced from: /Users/username/.rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-darwin18.0/openssl.bundle
  Reason: image not found - /Users/username/.rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-darwin18.0/openssl.bundle

I have tried removing and reinstalling openssl, brew update/upgrade. It has not budged.

ninebreaker
  • 53
  • 1
  • 5
  • 2
    did you try this https://stackoverflow.com/questions/59006602/dyld-library-not-loaded-usr-local-opt-openssl-lib-libssl-1-0-0-dylib – Nezir Dec 09 '19 at 19:16

1 Answers1

4
gem uninstall mysql2
brew install openssl
gem install mysql2 -- --with-opt-dir="$(brew --prefix openssl)"

This works for me.

Colin Lee
  • 201
  • 2
  • 4