mysql gem for snow leopard

Posted by Will on Stack Overflow See other posts from Stack Overflow or by Will
Published on 2009-11-13T06:26:42Z Indexed on 2010/04/15 16:03 UTC
Read the original article Hit count: 373

Filed under:
|
|
|

I had trouble with the gem at first but got it to work when I installed the 64-bit MySQL and reinsatlled the gem with arch flags.

So it work in rails. The error I used to get was

uninitialized constant MysqlCompat::MysqlRes

but that is now gone :)

However in Xcode when I run a RubyCocoa project I still get the old error of

uninitialized constant MysqlCompat::MysqlRes

Does anyone know why this may be?

Is it because the gdb is 64-bit?

How can it work in Rails but not in RubyCocoa?

A little debugging shows that it fails to load 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'

© Stack Overflow or respective owner

Related posts about rubygems

Related posts about ruby