Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mysql 雪豹宝石_Mysql_Ruby_Rubygems_Ruby Cocoa - Fatal编程技术网

Mysql 雪豹宝石

Mysql 雪豹宝石,mysql,ruby,rubygems,ruby-cocoa,Mysql,Ruby,Rubygems,Ruby Cocoa,起初,我在使用gem时遇到了麻烦,但当我安装64位MySQL并使用arch标志重新对gem进行了封装时,它才开始工作 所以它在rails中工作。我过去常犯的错误是 uninitialized constant MysqlCompat::MysqlRes 但这一点现在已不复存在:) 然而,在Xcode中,当我运行RubyCocoa项目时,我仍然会遇到 uninitialized constant MysqlCompat::MysqlRes 有人知道为什么会这样吗 是因为gdb是64位的吗 它如

起初,我在使用gem时遇到了麻烦,但当我安装64位MySQL并使用arch标志重新对gem进行了封装时,它才开始工作

所以它在rails中工作。我过去常犯的错误是

uninitialized constant MysqlCompat::MysqlRes
但这一点现在已不复存在:)

然而,在Xcode中,当我运行RubyCocoa项目时,我仍然会遇到

uninitialized constant MysqlCompat::MysqlRes
有人知道为什么会这样吗

是因为gdb是64位的吗

它如何在Rails中工作,而不是在RubyCocoa中

稍微调试一下就会发现它无法加载mysql_api.bundle

/Library/Ruby/Gems/1.8/gems/mysql-2.8.1/lib/mysql_api.bundle: 
dlopen(/Library/Ruby/Gems/1.8/gems/mysql-2.8.1/lib/mysql_api.bundle, 9): no suitable image found. 
Did find: (LoadError) /Library/Ruby/Gems/1.8/gems/mysql-2.8.1/lib/mysql_api.bundle: mach-o, but wrong architecture - 
/Library/Ruby/Gems/1.8/gems/mysql-2.8.1/lib/mysql_api.bundle from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'

问题可能是xcode使用的ruby框架版本比您通常使用的版本要多,我遇到了这个问题,并以某种方式解决了它

架构不匹配可能是其他原因:


/System/Library/Frameworks/Ruby.framework

我也遇到了同样的问题,如果我没记错的话,它与较旧的MySQL安装有关。我无意中安装了32位版本,注意到了错误并安装了64位版本

我通过如下所述删除MySQL,并重新安装带有arch标志的最新版本,从而消除了这个错误

你试过这个吗?

雪豹上的这个宝石有很多问题。请在此处查看,并按照其他一些地方的链接进行查看: