我在安装时收到以下错误信息,如果我需要发布更多详细信息,请让我知道。
我按照以下位置的说明进行操作:https://github.com/oneclick/rubyinstaller/wiki/Development-Kit
我使用的是ruby 1.9.2p136 (2010-12-25) i386-mingw32。
下面是我得到的结果:
E:\work_desk\trunk>gem install mysql2 -v 0.2.4
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
C:/Ruby192/bin/ruby.exe extconf.rb
checking for rb_thread_blocking_region()... yes
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:/Ruby192/bin/ruby
--with-mysql-dir
--without-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:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.
2.4 for inspection.
Results logged to C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql2-0.2.4/ext/mysql2/ge
m_make.out
发布于 2011-08-22 03:50:16
在四处寻找使其工作的方法后,我终于在命令提示符下安装了它:
gem install mysql2 -v 0.2.6
结果如下:
Fetching: mysql2-0.2.6-x86-mingw32.gem (100%)
Successfully installed mysql2-0.2.6-x86-minw32
1 gem installed
Installing ri documentation for mysql2-0.2.6-x86-mingw32...
Enclosing class/module 'mMysql2' for class Client not known
Installing RDoc documentation for mysql2-0.2.6-x86-mingw32...
Enclosing class/module 'mMysql2' for class Client not known
试试看。应该能行得通。
发布于 2011-04-02 02:16:46
如果仍然无法在windows7上安装mysql2 gem,或者对要遵循的步骤不是很清楚,请阅读这篇文章,它将帮助您逐步安装- http://rorguide.blogspot.com/2011/03/installing-mysql2-gem-on-ruby-192-and.html
对于mysql_api.so错误(C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql-2.8.1-x86-mingw32/lib/1.9/mysql_api.so
),将"libmySQL.dll“文件从C:\Program Files\MySQL\MySQL Server 5.1\bin
复制到C:\Ruby192\bin
安装路径可能会有所不同,有关详细信息,请参阅此http://rorguide.blogspot.com/2011/03/getting-error-specified-module-could.html发布后的内容。
希望这将帮助你解决你的问题。
发布于 2011-03-20 17:11:14
从这个开始:
checking for main() in -llibmysql... no
看起来你尚未安装MySQL驱动程序和应用程序。如果是这样,是否允许它们安装到默认位置?如果服务器在不同的机器上运行,您至少需要客户端软件。
https://stackoverflow.com/questions/5367563
复制相似问题