Skip to content

Commit

Permalink
Fix dll search paths for Ruby on Windows (#140)
Browse files Browse the repository at this point in the history
Signed-off-by: Addisu Z. Taddese <[email protected]>
  • Loading branch information
azeey authored Apr 19, 2024
1 parent d4eba07 commit 0598036
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/gz.in
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,13 @@ if ARGV.include?('--versions')
exit(0)
end

if defined? RubyInstaller
# RubyInstaller does not search for dlls in PATH
# https://github.com/oneclick/rubyinstaller2/wiki/For-gem-developers#-dll-loading
ENV['RUBY_DLL_PATH'] = ENV['PATH']
RubyInstaller::Runtime.enable_dll_search_paths
end

# Start Backward before loading plugins
begin
SharedLibInterface::Importer.dlload '@backward_library_name@'
Expand Down

0 comments on commit 0598036

Please sign in to comment.