I am fighting with an error that occurs when I run rails s:
/Users/adam/.rvm/gems/ruby-2.0.0-p481/gems/mysql2-0.3.16/lib/mysql2.rb:8:in `require': dlopen(/Users/adam/.rvm/gems/ruby-2.0.0-p481/extensions/x86_64-darwin-13/2.0.0-static/mysql2-0.3.16/mysql2/mysql2.bundle, 9): Library not loaded: @@HOMEBREW_PREFIX@@/opt/openssl/lib/libssl.1.0.0.dylib (LoadError)
Referenced from: /usr/lib/libmysqlclient.18.dylib
Reason: image not found - /Users/adam/.rvm/gems/ruby-2.0.0-p481/extensions/x86_64-darwin-13/2.0.0-static/mysql2-0.3.16/mysql2/mysql2.bundle
MySQL installed through brew.
Unfortunately I am not sure how to fix this issue, so I appreciate every help.
Thank you
I was having the same issue on my rbenv setup after updating a few things in Homebrew. I simply recompiled Ruby and the problem went away. In this case it looks like you might want to recompile all the gems as well. According to this SO you can run rvm reinstall 2.0.0-p481
(recompiles ruby and removes all gems) and then re-bundle your project and you should be good to go.
I'm pretty sure what happened is a new version of openssl was installed as a dependency for something else I installed using Homebrew and that broke the linking between the compiled Ruby and the old version of libssl.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With