gpt4 book ai didi

mysql - 请安装mysql适配器: `gem install activerecord-mysql-adapter` (cannot load such file -- mysql/mysql_api)

转载 作者:行者123 更新时间:2023-11-29 20:57:12 25 4
gpt4 key购买 nike

我知道以前有过类似的帖子,但似乎没有一个答案对我有用。当它向我显示错误时,我尝试运行命令“mongify check database.yml”

Please install the mysql adapter: `gem install activerecord-mysql-adapter` (cannot load such file -- mysql/mysql_api)

但我确实安装了 activerecord-mysql-adapter。我的database.yml 文件如下所示:

sql_connection do
adapter "mysql"
host "localhost"
username "root"
password "passw0rd"
database "my_database"
end

mongodb_connection do
host "localhost"
database "my_database"
end

如果您需要更多信息,请告诉我。

最佳答案

您想要执行 adapter: mysql2 而不是 mysql并确保你的 gemfile 中有

 gem 'mysql2', '0.3.19'
#Last time I used mysql it was showing some problem with newer versions.
#Please try checking for newer versions, if they are working.

关于mysql - 请安装mysql适配器: `gem install activerecord-mysql-adapter` (cannot load such file -- mysql/mysql_api),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37531499/

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