Ruby on rails warning "ruby is loading libcrypto in an unsafe way"

When i run rails commands on the terminal like creating a model, this is the error I get:

WARNING: /Users/my_mac_username/.rvm/rubies/ruby-2.5.3/bin/ruby is loading libcrypto in an unsafe way

[1] 5396 abort bin/rails g model ModelName attribute_1:string attribute_2:integer

My mac is running big sur,


Solution 1:

I ended up solving the same issue using information from this thread: https://giters.com/se3000/ruby-eth/issues/47

The solution which worked out of the box for me, on an M1 Mac, was to use the following:

sudo ln -s $(brew --prefix openssl)/lib/libcrypto.dylib /usr/local/lib/
sudo ln -s $(brew --prefix openssl)/lib/libssl.dylib  /usr/local/lib

This is definitely a dylib issue, as @tbraden pointed out.