Skip to content

Ruby 3.4 Load Errors #581

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

Closed
LukeIGS opened this issue Apr 7, 2025 · 2 comments · Fixed by #582
Closed

Ruby 3.4 Load Errors #581

LukeIGS opened this issue Apr 7, 2025 · 2 comments · Fixed by #582

Comments

@LukeIGS
Copy link

LukeIGS commented Apr 7, 2025

Attempting to load tiny_tds in ruby 3.4.2 (2025-02-15 revision d2930f8e7a) +PRISM [x64-mingw-ucrt] on windows 10/11 hosts will lead to an error with version 3.2.0, version 3.1.0 does not have this issue.

Steps:

  1. Install ruby 3.4 on a windows host using ruby installer
  2. $ gem install tiny_tds -v 3.2.0
  3. launch IRB
  4. require 'tiny_tds'

Expected:
tiny_tds should load with no errors

Actual:
irb(main):001> require 'tiny_tds'
internal:C:/devl/ruby/3.4/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb:136:in 'Kernel#require': cannot load such file -- tiny_tds/tiny_tds (LoadError)
from internal:C:/devl/ruby/3.4/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb:136:in 'Kernel#require'
from C:/devl/ruby/3.4/lib/ruby/gems/3.4.0/gems/tiny_tds-3.2.0-x64-mingw-ucrt/lib/tiny_tds.rb:40:in 'block in module:TinyTds'
from C:/devl/ruby/3.4/lib/ruby/gems/3.4.0/gems/tiny_tds-3.2.0-x64-mingw-ucrt/lib/tiny_tds.rb:30:in 'block in module:TinyTds'
from C:/devl/ruby/3.4/lib/ruby/gems/3.4.0/gems/tiny_tds-3.2.0-x64-mingw-ucrt/lib/tiny_tds.rb:34:in 'module:TinyTds'
from C:/devl/ruby/3.4/lib/ruby/gems/3.4.0/gems/tiny_tds-3.2.0-x64-mingw-ucrt/lib/tiny_tds.rb:10:in '<top (required)>'
from internal:C:/devl/ruby/3.4/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb:141:in 'Kernel#require'
from internal:C:/devl/ruby/3.4/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb:141:in 'Kernel#require'
from (irb):1:in '

'
from internal:kernel:168:in 'Kernel#loop'
from C:/devl/ruby/3.4/lib/ruby/gems/3.4.0/gems/irb-1.14.3/exe/irb:9:in '<top (required)>'
from C:/devl/ruby/3.4/bin/irb:33:in 'Kernel#load'
from C:/devl/ruby/3.4/bin/irb:33:in ''
internal:C:/devl/ruby/3.4/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb:136:in 'Kernel#require': 126: The specified module could not be found. - C:/devl/ruby/3.4/lib/ruby/gems/3.4.0/gems/tiny_tds-3.2.0-x64-mingw-ucrt/lib/tiny_tds/3.4/tiny_tds.so (LoadError)
from internal:C:/devl/ruby/3.4/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb:136:in 'Kernel#require'
from C:/devl/ruby/3.4/lib/ruby/gems/3.4.0/gems/tiny_tds-3.2.0-x64-mingw-ucrt/lib/tiny_tds.rb:38:in 'block in module:TinyTds'
from C:/devl/ruby/3.4/lib/ruby/gems/3.4.0/gems/tiny_tds-3.2.0-x64-mingw-ucrt/lib/tiny_tds.rb:30:in 'block in module:TinyTds'
from C:/devl/ruby/3.4/lib/ruby/gems/3.4.0/gems/tiny_tds-3.2.0-x64-mingw-ucrt/lib/tiny_tds.rb:34:in 'module:TinyTds'
from C:/devl/ruby/3.4/lib/ruby/gems/3.4.0/gems/tiny_tds-3.2.0-x64-mingw-ucrt/lib/tiny_tds.rb:10:in '<top (required)>'
from internal:C:/devl/ruby/3.4/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb:141:in 'Kernel#require'
from internal:C:/devl/ruby/3.4/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb:141:in 'Kernel#require'
from (irb):1:in ''
from C:/devl/ruby/3.4/lib/ruby/3.4.0/irb/workspace.rb:101:in 'Kernel#eval'
from C:/devl/ruby/3.4/lib/ruby/3.4.0/irb/workspace.rb:101:in 'IRB::WorkSpace#evaluate'
from C:/devl/ruby/3.4/lib/ruby/3.4.0/irb/context.rb:631:in 'IRB::Context#evaluate_expression'
from C:/devl/ruby/3.4/lib/ruby/3.4.0/irb/context.rb:599:in 'IRB::Context#evaluate'
from C:/devl/ruby/3.4/lib/ruby/3.4.0/irb.rb:1053:in 'block (2 levels) in IRB::Irb#eval_input'
from C:/devl/ruby/3.4/lib/ruby/3.4.0/irb.rb:1365:in 'IRB::Irb#signal_status'
from C:/devl/ruby/3.4/lib/ruby/3.4.0/irb.rb:1045:in 'block in IRB::Irb#eval_input'
from C:/devl/ruby/3.4/lib/ruby/3.4.0/irb.rb:1124:in 'block in IRB::Irb#each_top_level_statement'
... 10 levels...
internal:C:/devl/ruby/3.4/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb:136:in 'Kernel#require': cannot load such file -- tiny_tds (LoadError)
from internal:C:/devl/ruby/3.4/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb:136:in 'Kernel#require'
from (irb):1:in ''
from C:/devl/ruby/3.4/lib/ruby/3.4.0/irb/workspace.rb:101:in 'Kernel#eval'
from C:/devl/ruby/3.4/lib/ruby/3.4.0/irb/workspace.rb:101:in 'IRB::WorkSpace#evaluate'
from C:/devl/ruby/3.4/lib/ruby/3.4.0/irb/context.rb:631:in 'IRB::Context#evaluate_expression'
from C:/devl/ruby/3.4/lib/ruby/3.4.0/irb/context.rb:599:in 'IRB::Context#evaluate'
from C:/devl/ruby/3.4/lib/ruby/3.4.0/irb.rb:1053:in 'block (2 levels) in IRB::Irb#eval_input'
from C:/devl/ruby/3.4/lib/ruby/3.4.0/irb.rb:1365:in 'IRB::Irb#signal_status'
from C:/devl/ruby/3.4/lib/ruby/3.4.0/irb.rb:1045:in 'block in IRB::Irb#eval_input'
from C:/devl/ruby/3.4/lib/ruby/3.4.0/irb.rb:1124:in 'block in IRB::Irb#each_top_level_statement'
from internal:kernel:168:in 'Kernel#loop'
from C:/devl/ruby/3.4/lib/ruby/3.4.0/irb.rb:1121:in 'IRB::Irb#each_top_level_statement'
from C:/devl/ruby/3.4/lib/ruby/3.4.0/irb.rb:1044:in 'IRB::Irb#eval_input'
from C:/devl/ruby/3.4/lib/ruby/3.4.0/irb.rb:1025:in 'block in IRB::Irb#run'
from C:/devl/ruby/3.4/lib/ruby/3.4.0/irb.rb:1024:in 'Kernel#catch'
from C:/devl/ruby/3.4/lib/ruby/3.4.0/irb.rb:1024:in 'IRB::Irb#run'
... 4 levels...

@andyundso
Copy link
Member

found the issue: the libsybdb-5.dll needed to load tiny_tds is under ports/x64-mingw-ucrt/bin, but the Gem currently only loads the lib subfolder.

There is also some issue on our CI, I would have expected that it catches such an error, as we have a test that explicitely call require 'tiny_tds'.

I'll check and report back later this week, hopefully with a bugfix release.

@andyundso
Copy link
Member

Hi @LukeIGS, I just pushed a new release v3.2.1 that should fix the loading issue on Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants