-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not open library 'libvips-42.dll': The specified module could not be found.\r (LoadError) #326
Comments
Hi again @omokehinde, I tried on my win10 install. Here's what I did:
I made this "hello world" program: require "vips"
puts "using libvips version: #{Vips::version_string}"
image = Vips::Image.new_from_file ARGV[0]
puts "image: width = #{image.width}, height = #{image.height}" And ran it like this:
And it all seems to work. I think the advice about the environment variable is out of date -- now that the gemspec includes the msys dependency, it'll pull in the msys libvips package automatically. I'll update the docs. |
I've tried to fix the README. Does that help? |
Thanks @jcupitt |
I had a look at rubyinstaller: https://rubyinstaller.org/downloads/ Did you install "ruby+devkit 3.1.0-1 (x64)"? That's the one that also install msys2 for you. If you installed the non-devkit version, I would uninstall and then install the one with msys. |
@jcupitt |
You'll need to find out why your windows ruby package manager is locked. Perhaps it was interrupted half-way through an update? |
@jcupitt |
Sorry, I don't know. You'll need to read the documentation for your package manager. |
what package manager? |
I don't know. pacman I guess, from the error message. |
Hi @jcupitt, I have the same issue now with libvips 8.12.2. Previously, pacman installed libvips 8.11.2 but there ruby crashed (like discussed previously #331). Thankfully you updated the libvips package to 8.12.2 (msys2/MINGW-packages#11078). Unfortunately now with libvips 8.12.2 I get the same error like omokehinde: C:\>ruby test.rb
Traceback (most recent call last):
2: from test.rb:1:in `<main>'
1: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require'
C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require': cannot load such file -- vips (LoadError)
8: from test.rb:1:in `<main>'
7: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:147:in `require'
6: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:158:in `rescue in require'
5: from C:/Ruby27-x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:158:in `require'
4: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ruby-vips-2.1.4/lib/vips.rb:570:in `<top (required)>'
3: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ruby-vips-2.1.4/lib/vips.rb:573:in `<module:Vips>'
2: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ffi-1.13.1-x64-mingw32/lib/ffi/library.rb:99:in `ffi_lib'
1: from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ffi-1.13.1-x64-mingw32/lib/ffi/library.rb:99:in `map'
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ffi-1.13.1-x64-mingw32/lib/ffi/library.rb:145:in `block in ffi_lib': Could not open library 'libvips-42.dll': The specified procedure could not be found.\r (LoadError) I even get this error on a fresh install of rubyinstaller-devkit-2.7.5-1-x64.exe with system update option enabled. |
I am a windows 11 users, using rails 7.0 and ruby 3.0.1p64. I followed the instruction on the ruby-vips, installed the gem, installed the vips lib at C:\vips-dev-w64-web-8.12.1 on my windows machine and added it to path, I also set the RUBY_DLL_PATH to C:\vips-dev-w64-web-8.12.1\vips-dev-8.12\bin. When I run the rails sever I rails application crashes with this error:
Could not open library 'libvips-42.dll': The specified module could not be found.\r (LoadError)
I have
gem "image_processing", "~> 1.2"
in my gem file. How can I fix this?The text was updated successfully, but these errors were encountered: