我最近升级到 Snow Leopard,在遇到 MySQL 问题后我也升级了它。我关注了these instructions并使用 these sources 自行构建 MySQL .
现在 MySQL 服务器工作正常,但我无法让 Mysql2 gem 工作。
启动任何 Rails3 应用程序时,我总是收到此错误:
/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
我尝试了所有方法,但我仍然遇到同样的错误。你知道什么可能是错的吗?
最佳答案
关于升级到Snow Leopard后的Mysql2 gem问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4348831/