sqlite3-ruby icon indicating copy to clipboard operation
sqlite3-ruby copied to clipboard

windows "LoadError: 127: The specified procedure could not be found"

Open Srijith-Seetharaman opened this issue 6 months ago • 6 comments

Steps to reproduce Run a fresh installation of Windows 11 24H2

Install ruby-3.4.4 with devkit from the rubyinstaller page

Run rails new

Run rails s to start server

Expected behavior -> At step 3, all rails setup steps should happen without a hitch

-> At step 4, the rails server should start without any issues

Actual behavior The Pastebin of the full console output

System configuration Rails version: 8.0.2

Ruby version: 3.4.4

Windows version: Windows 11 24H2

OS Build: 26100.4061

I also wanted to add that rails setup and rails start are working in ruby 3.3.8 and rails 8.0.2, just not in ruby 3.4.4 and rails 8.0.2

@Edouard-chin from rails asked me to open this issue here, so doing so.

Srijith-Seetharaman avatar May 23 '25 12:05 Srijith-Seetharaman

To add some context, I figured it could be related to https://bugs.ruby-lang.org/issues/21286 and the fix that landed in Ruby 3.4.4 Also saw that the scheduled CI started to fail for that Ruby version https://github.com/sparklemotion/sqlite3-ruby/actions/runs/15156908735/job/42614692990

Edouard-chin avatar May 23 '25 12:05 Edouard-chin

I ran into this today - working fine on a server with ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [x64-mingw-ucrt]. Installed the same project (it's an installer, so exact same setup) on ruby 3.4.4 (2025-05-14 revision a38531fd3f) +PRISM [x64-mingw-ucrt] and it failed with the OP's issue.

Seems to corroborate the ruby 3.4.4 issue.

joshleblanc avatar May 26 '25 20:05 joshleblanc

Yes, I believe this is due to the ruby-lang issue linked by @Edouard-chin. If someone knows differently and is willing to help, it would be most welcome.

flavorjones avatar May 27 '25 12:05 flavorjones

I'll note that everything seems to be OK in the ruby-head "upstream" jobs: https://github.com/sparklemotion/sqlite3-ruby/actions/runs/15156943331

flavorjones avatar May 27 '25 13:05 flavorjones

I belive this is more on the side of the windows ruby installer. I do not know that much about how DLLs works or how does window installer manage those dependencies. But i manage to replicate the case in my Windows 10 PC. Here are some insights:

  1. require "sqlite3" in ruby 3.3.8 works fine (x64-mingw-ucrt)
  2. require "sqlite3" in ruby 3.4.4-2 breaks
  3. 3.3 version does not give any dependency error in the sqlite3/3.3/sqlite3_native.so file. (First picture)
  4. Realeases in ruby 3.3 and 3.4 version gives dependency error in the 3.4 version of the file sqlite3/3.4/sqlite3_native.so (Second picture)

I belive that the latests commits on rubyinstaller2 could be causing the issues. My thoughts are based on the latests changes of this commits of the last 3 weeks:

Image

Image

Edit: Here is some extra context that i found with similar errors:

  1. Winpthread issue in date gem: link
  2. Similar CI failures when loading date gem: link

domingo2000 avatar Jun 03 '25 00:06 domingo2000

My take - 3.4.4-2 and specifically updating MSYS2, then building sqllite3 with --platform ruby seems to resolve this.

OSXLich-Doug avatar Jun 24 '25 19:06 OSXLich-Doug

@larskanis Sorry to ping you, but I wonder if you have any insight into how I could diagnose or work around this issue?

flavorjones avatar Aug 20 '25 22:08 flavorjones