在windows 7计算机上的ROR中安装Mysql Gem
我试图安装在windows 7计算机上的ROR中安装Mysql Gem,mysql,ruby-on-rails,ruby,gem,Mysql,Ruby On Rails,Ruby,Gem,我试图安装mysql2gem,但我看到了这个错误 Using --with-mysql-dir=C:/mysql-connector ----- checking for main() in -llibmysql... no *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the m
mysql2
gem,但我看到了这个错误
Using --with-mysql-dir=C:/mysql-connector
-----
checking for main() in -llibmysql... no
*** 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.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby200-x64/bin/ruby
--with-mysql-dir
--with-mysql-include
--without-mysql-include=${mysql-dir}/include
--with-mysql-lib
--without-mysql-lib=${mysql-dir}/
--with-mysql-dir
--with-mysql-include
--without-mysql-include=${mysql-dir}/include
--with-mysql-lib
--without-mysql-lib=${mysql-dir}/lib
--with-libmysqllib
--without-libmysqllib
Gem files will remain installed in C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/mysql2-0.3.14 for inspec
Results logged to C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/mysql2-0.3.14/ext/mysql2/gem_make.out
我曾尝试将llibmysql.dll
文件复制到Ruby/bin
和Ruby/lib
文件夹,但没有成功
请告诉我是否有人遇到过这个问题(我想这是针对Windows 7+ROR+Mysql的)这对我来说很有效:
gem install mysql2 -- '--with-mysql-lib="c:\Program Files\MySQL\MySQL Server 5.5\lib" --with-mysql-include="c:\Program Files\MySQL\MySQL Server 5.5\include"'
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed mysql2-0.3.14
1 gem installed
Installing ri documentation for mysql2-0.3.14...
DL is deprecated, please use Fiddle
Installing RDoc documentation for mysql2-0.3.14...
我在windows上工作,很久以前我就放弃了在windows上使用rails(或django)。我使用带有Linux的虚拟机来运行我的开发环境。我强烈建议您也这样做,因为Windows上的许多外部库都会遇到很多错误。我认为Windows上的ROR应该是最糟糕的。我计划很快切换到Linux。。