ruby-eth: Can not use this gem on new rails project on Mac OS Catalina

Hi there,

After I added this gem to a fresh new rails project on Mac OS Catalina, I can not run rails c nor rake db:create anymore. The app either hang or crash without any error:

$ rake db:create
[1]    56641 abort      rake db:create

Removing the gem or using older version of Mac OS solve the problem ๐Ÿ˜ฆ There might be a problem with default zsh instead of bash on Mac OS Catalina, or a problem with openssl versions?

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 10
  • Comments: 22

Most upvoted comments

@fero46 thank you.

Using your suggestion I ended up with the following:

ln -s /usr/local/opt/openssl/lib/libssl.dylib /usr/local/lib/ ln -s /usr/local/opt/openssl/lib/libcrypto.dylib /usr/local/lib/

And that seemed to work for me

Maybe this is useful to someone (It works on MacBook Air M1)

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

So after a long research, I think I solved the problem. For some reason linking without versioning is not possible anymore:

Clients should not load the unversioned libssl dylib as it does not have a stable ABI. So I had openssl1.1

Steps to fix:

  1. brew update & brew upgrade & brew install openssl
  2. cd in your openssl lib folder in my case: usr/local/opt/openssl@1.1/lib
  3. copy files in /usr/lib: sudo cp libssl.1.1.dylib libcrypto.1.1.dylib /usr/local/lib/
  4. make softlink sudo ln -s libssl.1.1.dylib libssl.dylib sudo ln -s libcrypto.1.1.dylib libcrypto.dylib

Hope I could help you.

0.4.18 ๐ŸŽ‰

The above solution does fix the problem, thank you.

@fero46 I see you already fixed it once, but if you could edit two more things, which might throw off people less familiar with unix stuff: /usr/local not usr/local in point 2 (just a typo) and it could use a point โ€œ3.5 cd to /usr/local/libโ€ so itโ€™s clear the links should be made there.