Zaw Htut Win
Posted on February 2, 2024
Yesterday I was encountering
The specified module could not be found. - C:/Ruby/lib/ruby/ge
ms/2.0.0/extensions/x64-mingw32/2.0.0/mysql2-0.3.16/mysql2/mysql2.so (LoadError)
It was because I updated the AWS RDS from to 8.0 version last week. The applications that use Linux doesn't have problems but Windows.
So I downloaded the MySQLConnectorC and do
bash
gem install mysql2 -- --with-opt-lib c:/your/path/to/Ruby27-x64/msys64/mingw6/lib64
It recognize the library location but there are somemore errors
error: mingw32: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" is unknown
error: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" could not be looked up remotely
error: mingw64: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" is unknown
error: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" could not be looked up remotely
error: msys: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" is unknown
error: key "5F944B027F7FE2091985AA2EFA11531AA0AA7F57" could not be looked up remotely
error: database 'mingw32' is not valid (invalid or corrupted database (PGP signature))
error: database 'mingw64' is not valid (invalid or corrupted database (PGP signature))
error: database 'msys' is not valid (invalid or corrupted database (PGP signature))
the anwer is to use MSYS2 installation with the following command: pacman -Syu
But the problem is there is no executable file in Ruby windows called pacman.
So that's where ridk comes in. ridk is the Ruby Installer Developement Kit. if you just execute ridk in command line, you will know.
The command to run pacman using ridk is this
ridk exec pacman -Syu
Viola! It will recreate the corrupted databases
Posted on February 2, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
October 30, 2020