Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby 3 Rails 7 minitest ruby vips warning (from image processing)

I am getting a ton of warnings from ruby vips when running my test suit. Not causing any issues... just really annoying. Does anyone know the root issue here or know how to suppress the ruby vips warnings?

ruby '3.1.2'
gem 'rails', '~> 7.0.4'
gem 'image_processing', '~> 1.2' # ruby vips is a depency here. Gemfile.lock has ruby-vips 2.1.4 installed

When running tests (mini tests) I get this. Has anyone else seen this?

/Users/clarktaylor/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/ruby-vips-2.1.4/lib/vips.rb:51: warning: already initialized constant GLib::G_FREE
/Users/clarktaylor/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/ruby-vips-2.1.4/lib/vips.rb:51: warning: previous definition of G_FREE was here
/Users/clarktaylor/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/ruby-vips-2.1.4/lib/vips.rb:59: warning: already initialized constant GLib::LOG_FLAG_RECURSION
...

The warning go on for about 80 lines. Any help would be greatly appreciated!

like image 270
Clark Taylor Avatar asked Jan 25 '26 15:01

Clark Taylor


1 Answers

Make sure you have libvips42 installed (sudo apt install libvips42). More here: https://github.com/libvips/ruby-vips

like image 147
Asterix Avatar answered Jan 27 '26 05:01

Asterix



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!