gpt4 book ai didi

mysql - Sequel gem & MySQL (Ruby + Windows) : load mysql. so文件,不是mysql.rb

转载 作者:可可西里 更新时间:2023-11-01 11:37:45 24 4
gpt4 key购买 nike

使用 ruby​​ gem 'sequel',当我尝试 Sequel.connect("mysql://localhost") 时,出现以下错误:

Sequel::AdapterNotFound: LoadError: require 'mysql' did not define Mysql::CLIENT_MULTI_RESULTS!
You are probably using the pure ruby mysql.rb driver,
which Sequel does not support. You need to install
the C based adapter, and make sure that the mysql.so
file is loaded instead of the mysql.rb file.

如何让这个 gem 连接到 MySQL 服务器?

系统:Win XP,Ruby 1.8.7,Mysql 5.1.51

最佳答案

在此线程上找到了解决方案:Unable to connect mysql from Sequel gem

Sequel.connect() 之前调用 gem('mysql') 以指定使用 native sql 驱动程序。

(为杰里米·埃文斯投票)

关于mysql - Sequel gem & MySQL (Ruby + Windows) : load mysql. so文件,不是mysql.rb,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6986650/

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