gpt4 book ai didi

mysql - LoadError using MySQL with ruby​​ (mysql_api.so not found)

转载 作者:太空宇宙 更新时间:2023-11-03 16:09:15 25 4
gpt4 key购买 nike

我安装了 MySQL 5.5 (mysql-installer-5.5.15.0.msi) 和 mysql gem(使用“gem install mysql”命令)。现在我写了一个简单的程序,当我运行它时,ruby 给我这条消息:

C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': 126: The    specified module could not be found.   - C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql-2.8.1-x86-mingw32/lib/1.9/mysql_api.so (LoadError)

有人可以帮我解决这个问题吗?谢谢


我将“libmySQL.dll”文件从“C:\Program Files\MySQL\MySQL Server 5.1\bin”复制到“C:\Ruby192\bin”但是现在当我运行程序时 Ruby 给我这个错误:

C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': 193: %1 is not a valid Win32 application.   - C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql-2.8.1-x86-mingw32/lib/1.9/mysql_api.so (LoadError)

最佳答案

http://instantrails.rubyforge.org/svn/trunk/InstantRails-win/InstantRails/mysql/bin/您必须使用此处的 libmysql.dll 来解决问题。

关于mysql - LoadError using MySQL with ruby​​ (mysql_api.so not found),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7224478/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com