2011-03-15 122 views
0

我最近在Snow Leopard的全新副本上安裝了mysql-5.5.9-osx10.6-x86_64。雪豹故障編譯mysql gem

雖然版本報告i386。

./mysql --version 
Ver 14.14 Distrib 5.5.9, for osx10.6 (i386) using readline 5.1 

這是預期的行爲?

我在使用64位擴展上的Snow Leopard。我已經使用RVM安裝了ruby-1.8.7-p334 [x86_64]並確保它被選中。

我編譯使用mysql寶石:

sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-dir=/usr/local/mysql 

雖然當我嘗試運行Rails應用程序我得到以下錯誤:

/!\ FAILSAFE /!\ Tue Mar 15 17:31:32 -0400 2011 
    Status: 500 Internal Server Error 
    uninitialized constant MysqlCompat::MysqlRes 
    /Users/jaredbrown/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:440:in `load_missing_constant' 
    /Users/jaredbrown/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:80:in `const_missing_not_from_s3_library' 
    /Users/jaredbrown/.rvm/gems/ruby-1.8.7-p334/gems/aws-s3-0.6.2/lib/aws/s3/extensions.rb:206:in `const_missing' 
    /Users/jaredbrown/.rvm/gems/ruby-1.8.7-p334/gems/activerecord-2.3.4/lib/active_record/connection_adapters/mysql_adapter.rb:9:in `define_all_hashes_method!' 
    /Users/jaredbrown/.rvm/gems/ruby-1.8.7-p334/gems/activerecord-2.3.4/lib/active_record/connection_adapters/mysql_adapter.rb:66:in `mysql_connection' 

我認爲創業板是否正確,但我建設仍然會出現MySQL錯誤。在這一點上,我正在爲此撓頭。

+0

我嘗試了http://lightyearsoftware.com/2011/02/mysql-5-5-on-mac-os-x/上的指示,但沒有運氣。我通過降級到mysql-5-1解決了這個問題。 – 2011-03-15 22:42:43

回答

1

請勿使用MySQL 5.5,請使用版本5.1。