Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/62.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
gem安装mysql2 windows本机扩展等问题_Mysql_Ruby_Gem - Fatal编程技术网

gem安装mysql2 windows本机扩展等问题

gem安装mysql2 windows本机扩展等问题,mysql,ruby,gem,Mysql,Ruby,Gem,我浏览了很多网站,没有任何对其他人有用的东西似乎对我有用 C:/Users/Holly/Desktop/Brolie>gem install mysql2 Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing mysql2: ERROR: Failed to bui

我浏览了很多网站,没有任何对其他人有用的东西似乎对我有用

 C:/Users/Holly/Desktop/Brolie>gem install mysql2 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:/Ruby200-x64/bin/ruby.exe extconf.rb checking for rb_thread_blocking_region()... yes checking for
 rb_wait_for_single_fd()... yes checking for rb_hash_dup()... yes
 checking for rb_intern3()... yes
 *** 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
         --without-mysql-dir
         --with-mysql-include
         --without-mysql-include=${mysql-dir}/include
         --with-mysql-lib
         --without-mysql-lib=${mysql-dir}/ extconf.rb:37:in `<main>': undefined method `[]' for nil:NilClass (NoMethodError )


 Gem files will remain installed in
 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/mysql 2-0.3.13 for inspection.
 Results logged to
 C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/mysql2-0.3.13/ext/mysq
 l2/gem_make.out
C:/Users/Holly/Desktop/Brolie>gem安装mysql2
包含DevKit的路径。。。构建本机扩展。这可能需要
一会儿。。。错误:安装mysql2时出错:
错误:无法生成gem本机扩展。
C:/Ruby200-x64/bin/ruby.exe extconf.rb检查rb\u线程\u阻塞\u区域()。。。是的,检查一下
rb\u等待\u单个\u fd()。。。是正在检查rb_hash_dup()。。。对
正在检查rb_intern3()。。。对
***extconf.rb失败***由于某种原因无法创建Makefile,可能是缺少必要的库和/或头。检查
有关详细信息,请参阅mkmf.log文件。您可能需要配置
选项。
提供的配置选项:
--使用opt dir
--不带opt dir
--选择包含
--不带opt include=${opt dir}/include
--使用opt lib
--不带opt lib=${opt dir}/lib
--用make prog
--没有make prog
--srcdir=。
--库尔迪尔
--ruby=C:/Ruby200-x64/bin/ruby
--使用mysql目录
--没有mysql目录
--使用mysql包括
--不带mysql include=${mysql dir}/include
--使用mysql库
--没有mysql lib=${mysql dir}/extconf.rb:37:in`':nil:NilClass(NoMethodError)的未定义方法“[]”
Gem文件仍将安装在中
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/mysql 2-0.3.13进行检查。
结果记录到
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/mysql2-0.3.13/ext/mysq
l2/宝石制作

我的DevKit是正确的下载。我尝试添加连接器,但没有任何效果。通过一个类一步一步地进行安装,所以我知道我是按照正确的顺序进行安装的,但是没有任何东西可以帮助这个错误。

这实际上看起来像是
extconf.rb:37上的一个bug,而不是缺少依赖项或一些编译问题


假设您三次检查此版本的gem是否支持您的ruby版本,并且您使用的是ruby版本支持的最新版本,我建议。

谢谢!我曾尝试使用mysql gem而不是mysql2,但也遇到了同样的问题。现在前往github。非常感谢。