2011-06-27 119 views
1

似乎有一大堆博客和說明可以做到這一點,但我認爲他們面臨的一個大問題是他們沒有指定架構..他們假設32位...這讓我很難過=(Ruby on Rails:如何在10.6.7 Mac OS X(64位)上安裝mysql gem

任何人都知道在64bit雪豹上安裝mysql連接器/它工作得很好

編輯:

% sudo gem install mysql 
Password: 
Building native extensions. This could take a while... 
ERROR: Error installing mysql: 
    ERROR: Failed to build gem native extension. 

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb 



Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/mysql-2.8.1 for inspection. 
Results logged to /Library/Ruby/Gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out 

編輯#2

% sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql 
Building native extensions. This could take a while... 
ERROR: Error installing mysql: 
    ERROR: Failed to build gem native extension. 

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb --with-mysql-dir=/usr/local/mysql  

Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/mysql-2.8.1 for inspection. 
Results logged to /Library/Ruby/Gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out 
+1

所以'創業板安裝mysql'沒有工作? –

+0

當你做'gem install mysql'時會發生什麼?我在Linux上,但始終是64位,這個問題通常是與MySQL頭 – loosecannon

+0

nope,我會添加的輸出。 – NullVoxPopuli

回答

0

我用MacPorts的安裝mysql,它提供了必要的頭文件編譯使用gem install mysql MySQL的寶石。我知道我的mysql安裝是64位的(file /path/to/mysql報告Mach-O 64-bit executable x86_64)。我假設MySQL的寶石也是。我希望這是你要找的。

+0

不起作用,如我的問題 – NullVoxPopuli

+0

中所示)對不起,我沒有看到任何提及的macports在你的問題。 – David

+0

我沒有使用macports? – NullVoxPopuli