le0pard / webp-ffi

Ruby wrapper for libwebp
https://leopard.in.ua/webp-ffi/
MIT License
113 stars 14 forks source link

Error running on Mac 10.13.4 #16

Closed chrise86 closed 6 years ago

chrise86 commented 6 years ago

Gem seems to install ok, but when booting a Rails console / server I get the following:

/Users/chrisedwards/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/ffi-1.9.18/lib/ffi/library.rb:147:in `block in ffi_lib': Could not open library '/Users/chrisedwards/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/webp-ffi-0.2.5/ext/webp_ffi/x86_64-darwin/libwebp_ffi.bundle': dlopen(/Users/chrisedwards/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/webp-ffi-0.2.5/ext/webp_ffi/x86_64-darwin/libwebp_ffi.bundle, 5): Library not loaded: /usr/local/opt/jpeg/lib/libjpeg.8.dylib (LoadError)
  Referenced from: /usr/local/opt/libtiff/lib/libtiff.5.dylib
  Reason: image not found

brew info jpeg:

jpeg: stable 9c (bottled)
chrise86 commented 6 years ago

Upgrading libtiff fixed it!

le0pard commented 6 years ago
$ rails c 
Loading development environment (Rails 5.1.6)
2.5.0 :001 > require 'webp-ffi'
 => true
2.5.0 :002 > WebP.decoder_version
 => "1.0.0"
2.5.0 :003 >

cannot reproduce