0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

rails serverでdlopen...image not foundの謎エラーの解決方法

Posted at

rails serverを起動でいきなり謎のエラーが出現した。

dlopen(/Users/xxx/xxx/vendor/bundle/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass.bundle, 5): image not found (LoadError)

$ bundle exec rails s
/Users/xxxxx/xxxxx/vendor/bundle/ruby/2.6.0/gems/ffi-1.12.2/lib/ffi/library.rb:145:in 
`block in ffi_lib': Could not open library '/Users/xxxxx/xxxxx/vendor/bundle/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass.bundle': 
dlopen(/Users/xxxxx/xxxxx/vendor/bundle/ruby/2.6.0/gems/sassc-2.2.1/ext/libsass.bundle, 5)
: image not found (LoadError)

解決方法

いろんな方法を試したが、対象のgemが関連する部分をGemfile.lockで確認。

sass-rails関連でインストールされていた。

    sass-rails (6.0.0)
      sassc-rails (~> 2.1, >= 2.1.1)
    sassc (2.3.0)

そこで、

  1. Gemfile内のsass-railsを一度コメントアウト
  2. bundle install
  3. コメントアウトを外し再度bundle install

gemのバージョンは上がったが、無事にrails serverで起動できた。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?