我安装了以下版本:
我运行了以下三个命令:
$ gem i mysql2
$ gem install mysql2 -- '--with-mysql-lib="C:\Program Files\MySQL\MySQL Server 5.6\lib" --with-mysql-include="C:\Program Files\MySQL\MySQL Server 5.6\include" --with-mysql-dir="C:\Program Files\MySQL\MySQL Server 5.6"'
$ gem install mysql2 --platform=ruby -- '--with-mysql-lib="C:\mysql-connector-c-noinstall-6.0.2-win32-vs2005\lib" --with-mysql-include="C:\mysql-connector-c-noinstall-6.0.2-win32-vs2005\include" --with-mysql-dir="C:\mysql-connector-c-noinstall-6.0.2-win32-vs2005"'
以上三厘米有以下错误:
* extconf.rb failed * Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.
答案 0 :(得分:0)
sudo apt-get install libmysql-ruby libmysqlclient-dev