我已经浏览了很多网站,其他任何对其他人都有用的东西似乎都在为我工作。
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
我的DevKit是正确的下载。我试过添加连接器,没有做任何事情。通过类逐步安装,所以我知道我正在以正确的顺序做事,但没有任何事情可以帮助解决这个错误。
答案 0 :(得分:0)
这实际上似乎是extconf.rb:37
上的错误,而不是缺少依赖项或某些编译问题。
假设您三重检查此版本的gem支持您的ruby版本并且您使用的是ruby版本支持的最新版本,我建议open an issue on github。