簡體   English   中英

在具有64位ruby和64位Windows的rails上為ruby安裝mysql2擴展

[英]Install mysql2 extension for ruby on rails with 64 bits ruby and 64 bits windows

我已經從http://rubyinstaller.org/downloads/安裝了ruby的64位版本

嘗試安裝mysql時,我下載了64位版本的連接器

我得到了錯誤

compiling client.c
In file included from client.c:1:0:
./mysql2_ext.h:17:19: fatal error: mysql.h: No such file or directory
compilation terminated.
make: *** [client.o] Error 1

如您在下一個屏幕中看到的

在此處輸入圖片說明

最終, 這一常見問題解決了。 我猜是因為我完全下載了本文中鏈接的連接器的版本並運行

gem install mysql2 --no-ri --no-rdoc --platform=ruby -- --with-mysql-include=C:/mysql-connector-c-noinstall-6.0.2-winx64\include --with-mysql-lib=C:/mysql-connector-c-noinstall-6.0.2-winx64\lib

編輯-在此處找到用於64位版本的連接器的正確版本。 普通版本存在segfaults,因此由於有了此線程,我找到了正確的版本https://github.com/brianmario/mysql2/issues/372

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM