Windows上成功安裝Ruby-1.9.3 gem mysql2

志_祥發表於2014-11-01

之前可能需要從libmysql.dll生成libmysqlclient.a: 來源


cd C:\xampp-1.8.3\mysql\lib
C:\DevKit-tdm-32-4.5.2-20111229-1559-sfx\devkitvars.bat
pexports.exe libmysql.dll > libmysql.def

   //來源:C:\strawberry\c\bin\pexports.EXE 幸虧安裝了perl,否則不知道到哪裡找這個pexports工具下了
dlltool --input-def libmysql.def --dllname libmysql.dll --output-lib libmysqlclient.a -k


c:\redmine-2.6.0>gem install mysql2 --version=0.3.16 --platform=ruby -- --with-mysql-include=C:\xampp-1.8.3\mysql\include --with-mysql-lib=C:\xampp-1.8.3\mysql\
lib

Building native extensions.  This could take a while...
Successfully installed mysql2-0.3.16
1 gem installed
Installing ri documentation for mysql2-0.3.16...
Installing RDoc documentation for mysql2-0.3.16...

cd c:\redmine-2.6.0

bundle install


相關文章