无法在Ruby 1.8.7(无轨道)环境中的Win 7 x64上安装mysql2(0.3.11)gem

时间:2012-07-17 14:25:31

标签: ruby gem compatibility windows-7-x64 mysql2

我想我已尝试过每一个建议here。我也在运行Win7 x64。没有在MySQL服务器上进行任何开发,只需要远程连接到数据库

我正在运行Ruby 1.8.7

ruby --version
ruby 1.8.7 (2012-06-29 patchlevel 370) [i386-mingw32]

我尝试从“使用Ruby启动命令提示符”窗口运行安装(已经安装了几个宝石):

gem list

*** LOCAL GEMS ***

addressable (2.2.8)
childprocess (0.3.3)
ffi (1.0.11)
libwebsocket (0.1.4)
multi_json (1.3.6)
net-sftp (2.0.5)
net-ssh (2.5.2)
net-ssh-gateway (1.1.0)
rdiscount (1.6.8)
rubyzip (0.9.9)
selenium-webdriver (2.24.0)

我没有运行Ruby on Rails,在我的环境中不需要(我不相信)。无论方法如何,结果仍然相同:

gem install mysql2 -- --with-mysql-include="C:\MySQL\include" --with-mysql
-lib="C:\MySQL\lib\"
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
*** 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:/Ruby187/bin/ruby
        --with-mysql-dir
        --without-mysql-dir
        --with-mysql-include=${mysql-dir}/include
        --with-mysql-lib=${mysql-dir}/lib
        --with-libmysqllib
        --without-libmysqllib
ERROR:  Error installing mysql2:
        ERROR: Failed to build gem native extension.

        C:/Ruby187/bin/ruby.exe extconf.rb --with-mysql-include=C:\MySQL\include
 --with-mysql-lib=C:\MySQL\lib"
checking for rb_thread_blocking_region()... no
checking for rb_wait_for_single_fd()... no
checking for main() in -llibmysql... no


Gem files will remain installed in C:/Ruby187/lib/ruby/gems/1.8/gems/mysql2-0.3.
11 for inspection.
Results logged to C:/Ruby187/lib/ruby/gems/1.8/gems/mysql2-0.3.11/ext/mysql2/gem
_make.out

我正在考虑在盒子上运行XP模式只是为了获得一个纯粹的32位环境,但这似乎是一个廉价的黑客。

困扰我的部分是“在-llibmysql中检查main()...没有”这意味着(从我读到的)MySql应用程序和/或驱动程序不是安装正确。我尝试过不同的MySQL社区排列(是问题吗?)服务器32/64位或C连接器MSI / ZIP

有人能够在没有导轨的情况下运行吗?我本身并不进行Web开发,但希望使用Selenium来推动Web浏览会话。

0 个答案:

没有答案