开发者

Mysql2 gem problem after upgrading to Snow Leopard

开发者 https://www.devze.com 2023-01-28 14:35 出处:网络
I upgraded to Snow Leopard recently and after having troubles with MySQL I upgraded开发者_Python百科 it as well. I followed these instructions and built MySQL by myself using these sources.

I upgraded to Snow Leopard recently and after having troubles with MySQL I upgraded开发者_Python百科 it as well. I followed these instructions and built MySQL by myself using these sources.

Now MySQL server works fine, but I can't get Mysql2 gem working.

I keep getting this error when starting any Rails3 app:

/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle: dlopen(/opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle, 9): no suitable image found.  Did find: (LoadError)
 /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle: mach-o, but wrong architecture - /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle

I tried everything, but I'm still getting the same error. Do you have any idea what might be wrong?


Try installing MySQL 64 bit from here I had the same problem and it worked for me , also try using rvm some version of ruby might not work properly so it's pretty easy to change between them with rvm .

0

精彩评论

暂无评论...
验证码 换一张
取 消