Shrine test suite - not running successfully (on my PC)

Hi all

I’m trying to get shrine’s test suite working: are there further instructions that I might be missing?

I can do a PR once solved, if required. if the solution is not readily apparent, or if i’m not missing something obvious, I will simply investigate further.

Here are the steps I’ve done:

  1. I’ve cloned the shrine repo via github.
  2. I added: sudo apt-get install libmagic-dev and also sqlite on my PC.
  3. I ran bundle install in shrine’s directory:
  4. then I ran: rake test . And a few tests failed:
  1. Error:
    Shrine::Plugins::StoreDimensions:::ruby_vips analyzer#test_0001_extracts dimensions from files:
    LoadError: Could not open library ‘vips.so.42’: vips.so.42: cannot open shared object file: No such file or directory.
    Could not open library ‘libvips.so.42’: libvips.so.42: cannot open shared object file: No such file or directory
    /home/koshy/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/ffi-1.12.2/lib/ffi/library.rb:145:in block in ffi_lib' /home/koshy/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/ffi-1.12.2/lib/ffi/library.rb:99:in map’
    /home/koshy/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/ffi-1.12.2/lib/ffi/library.rb:99:in ffi_lib' /home/koshy/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/ruby-vips-2.0.17/lib/vips.rb:528:in module:Vips
    /home/koshy/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/ruby-vips-2.0.17/lib/vips.rb:525:in <top (required)>' /home/koshy/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:291:in require’
    /home/koshy/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:291:in block in require' /home/koshy/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:257:in load_dependency’
    /home/koshy/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:291:in require' /home/koshy/UbuntuHDD/Documents/RailsProjects/OpenSourceProjects/shrine/lib/shrine/plugins/store_dimensions.rb:135:in extract_with_ruby_vips’
    /home/koshy/UbuntuHDD/Documents/RailsProjects/OpenSourceProjects/shrine/lib/shrine/plugins/store_dimensions.rb:107:in call' /home/koshy/UbuntuHDD/Documents/RailsProjects/OpenSourceProjects/shrine/lib/shrine/plugins/store_dimensions.rb:40:in call’
    /home/koshy/UbuntuHDD/Documents/RailsProjects/OpenSourceProjects/shrine/lib/shrine/plugins/store_dimensions.rb:40:in block in extract_dimensions' /home/koshy/UbuntuHDD/Documents/RailsProjects/OpenSourceProjects/shrine/lib/shrine/plugins/store_dimensions.rb:67:in instrument_dimensions’
    /home/koshy/UbuntuHDD/Documents/RailsProjects/OpenSourceProjects/shrine/lib/shrine/plugins/store_dimensions.rb:40:in extract_dimensions' /home/koshy/UbuntuHDD/Documents/RailsProjects/OpenSourceProjects/shrine/test/plugin/store_dimensions_test.rb:58:in block (3 levels) in <top (required)>’

1457 runs, 2932 assertions, 0 failures, 3 errors, 0 skips
rake aborted!
Command failed with status (1)

Hi

You need to have image processing libraries libvips installed, and probably ImageMagick as well. See if that solves it.

Yes, that solved it - thank you.

I’ll put in a PR and make a note of it, so others can get the test suite up and running.

1 Like