简体   繁体   English

MySQL + Snow Leopard + 32位+ Ruby on Rails =未初始化的常量MysqlCompat :: MysqlRes(帮助!)

[英]MySQL + Snow Leopard + 32 Bit + Ruby on Rails = uninitialized constant MysqlCompat::MysqlRes (HELP!)

So i'm running Snow Leopard on a BlackBook. 所以我在BlackBook上运行Snow Leopard。 I'm attempting to get rake db:migrate to work with this project but I get the MysqlCompat::MysqlRes error. 我正在尝试使rake db:migrate与此项目一起工作,但出现MysqlCompat :: MysqlRes错误。 Is there any special way to install or build the gem and/or the actual MySQL binaries themselves to get this to work on my machine? 是否有任何特殊的方法来安装或构建gem和/或实际的MySQL二进制文件,以使其在我的计算机上正常工作?

Something like this should do the trick: 这样的事情应该可以解决问题:

$ sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

You can find your mysql_config with locate bin/mysql_config -- and use that path instead of the above if it's different. 您可以通过locate bin/mysql_config ,并使用该路径代替上面的路径(如果不同)。

If that doesn't work, here's a more complicated answer: 如果这不起作用,则有一个更复杂的答案:

http://accidentaltechnologist.com/apple/fixing-uninitialized-constant-mysqlcompatmysqlres-error-on-snow-leopard/ http://accidentaltechnologist.com/apple/fixing-uninitialized-constant-mysqlcompatmysqlres-error-on-snow-leopard/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM