When using resouces or implementing ActiveAdmin, when I started the server and accessed it, the server went down and I was worried. Write the first aid in that case as a memorandum.
PC environment
macOS Mojave
Ruby 2.5.1
Rails 5.2.4
terminal
dyld: lazy symbol binding failed: Symbol not found: _ffi_prep_closure_loc
Referenced from: /Users/ytanaka/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/ffi-1.13.1/lib/ffi_c.bundle
Expected in: /usr/lib/libffi.dylib
dyld: Symbol not found: _ffi_prep_closure_loc
Referenced from: /Users/ytanaka/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/ffi-1.13.1/lib/ffi_c.bundle
Expected in: /usr/lib/libffi.dylib
Abort trap: 6
I didn't understand much about it, but I decided that there was a problem with gem's ffi. So I thought about ** ffi version change **.
terminal
gem install ffi -v "1.12.1"
Install the old version of gem ffi above
Then change the version of ffi in Rails Gemfile.lock
Gemfile.lock
ffi (1.13.1) #Delete
ffi (1.12.1) #add to
The above process does not cause the server to go down and it works normally.