I am using Ruby 2.1.5 and rest details are
* LOCAL GEMS *
bigdecimal (1.2.4) io-console (0.4.2) json (1.8.1) minitest (4.7.5) mysql (2.8.1 x86-mingw32) psych (2.0.5) rake (10.1.0) rdoc (4.1.0) test-unit (2.1.5.0)
and when i am installing mysql-2.9.1.gem it is giving an error as follows::
Building native extensions. This could take a while...
ERROR: Error installing mysql-2.9.1.gem:
ERROR: Failed to build gem native extension.
C:/Ruby21-x64/bin/ruby.exe extconf.rb
checking for main() in -llibmysql... *** 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:/Ruby21-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}/lib
--with-libmysqllib
--without-libmysqllib
C:/Ruby21-x64/lib/ruby/2.1.0/mkmf.rb:456:in `try_do': The compiler failed to gen
erate an executable file. (RuntimeError)
You have to install development tools first.
from C:/Ruby21-x64/lib/ruby/2.1.0/mkmf.rb:541:in `try_link0'
from C:/Ruby21-x64/lib/ruby/2.1.0/mkmf.rb:556:in `try_link'
from C:/Ruby21-x64/lib/ruby/2.1.0/mkmf.rb:742:in `try_func'
from C:/Ruby21-x64/lib/ruby/2.1.0/mkmf.rb:973:in `block in have_library'
from C:/Ruby21-x64/lib/ruby/2.1.0/mkmf.rb:918:in `block in checking_for'
from C:/Ruby21-x64/lib/ruby/2.1.0/mkmf.rb:351:in `block (2 levels) in po
stpone'
from C:/Ruby21-x64/lib/ruby/2.1.0/mkmf.rb:321:in `open'
from C:/Ruby21-x64/lib/ruby/2.1.0/mkmf.rb:351:in `block in postpone'
from C:/Ruby21-x64/lib/ruby/2.1.0/mkmf.rb:321:in `open'
from C:/Ruby21-x64/lib/ruby/2.1.0/mkmf.rb:347:in `postpone'
from C:/Ruby21-x64/lib/ruby/2.1.0/mkmf.rb:917:in `checking_for'
from C:/Ruby21-x64/lib/ruby/2.1.0/mkmf.rb:968:in `have_library'
from extconf.rb:27:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/mysql-
2.9.1 for inspection.
Results logged to C:/Ruby21-x64/lib/ruby/gems/2.1.0/extensions/x64-mingw32/2.1.0
/mysql-2.9.1/gem_make.out
D:\Softwares>
I also had this problem when I am installing mysql gem. Maybe this can help.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.