Rails - library not loaded: @@ HOMEBREW_PREFIX @@ / opt / openssl / lib / libssl.1.0.0.dylib (LoadError)

I am struggling with an error that occurs when I start s rails :

/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 is installed through brew .

Unfortunately, I'm not sure how to fix this problem, so I appreciate every help.

thanks

+6
source share
1 answer

I had the same problem on my rbenv installation after updating a few things in Homebrew. I just recompiled Ruby and the problem disappeared. In this case, it looks like you will want to recompile all the gems. According to this SO, you can run rvm reinstall 2.0.0-p481 (recompile ruby ​​and remove all gems) and then re-link your project and you should be good to go.

I am pretty sure what happened since the new version of openssl was installed as a dependency for something else that I installed using Homebrew and this broke the connection between compiled Ruby and the old version of libssl.

+1
source

Source: https://habr.com/ru/post/971103/


All Articles