1

I'm using Mac OS for development. Now I'm developing an app using Blockcypher API. With Ruby on Rails, when I try to send money using the Gem, it always return this error

FFI::NotFoundError (Function 'OPENSSL_init_ssl' not found in [libssl.dylib])

Already try to upgrade or downgrade the OpenSSL version on my mac but nothing happend and it so frustating. My friend on linux doesn't get this error, work perfectly on his device. Has anyone ever got this error?

Fauzi Rachman
  • 103
  • 1
  • 2
  • 9

1 Answers1

0

I had the same problem, after research for one day I found the solution for rvm ruby-2.7.2 version:

  1. Install openssl version 1.1:

brew update & brew upgrade & brew install openssl@1.1

  1. cd in your openssl lib folder in my case: /usr/local/opt/openssl@1.1/lib copy files to /usr/lib

cd /usr/local/opt/openssl@1.1/lib

  1. Copy the libssl.1.1.dylib file

sudo cp libssl.1.1.dylib libcrypto.1.1.dylib /usr/local/lib/

  1. make softlink

sudo ln -s libssl.1.1.dylib libssl.dylib

sudo ln -s libcrypto.1.1.dylib libcrypto.dylib

  1. Reinstall ruby with openssl version:

rvm reinstall 2.7.2 --with-openssl-dir=/usr/local/opt/openssl@1.1

References github issues, stackoverflow.

Pablo Alejandro
  • 591
  • 2
  • 10
  • 19