LoginSignup
0
0

More than 3 years have passed since last update.

ffi-1.13.1でサーバーが落ちてしまうので応急処置

Posted at

resoucesの活用やActiveAdminを実装した際にサーバーを立ち上げてアクセスするとサーバーが落ちて悩んでおりました。
その際の応急処置を備忘録として書きます。

PC環境

  • 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

あまり内容は理解できていませんでしたが、どうやらgemのffiで問題が起こっていそうだと判断しました。
なので、ffiのバージョン変更はどうかと考えました。

手順

terminal
gem install ffi -v "1.12.1"

上記でgemのffiの古いバージョンをインストール

次にRailsのGemfile.lockのffiのバージョンを変更

Gemfile.lock
ffi (1.13.1) #削除
ffi (1.12.1) #追加

上記の処理でサーバーが落ちる事なく正常に動いてくれております。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0