0
我使用Ruby 2.1.5安裝mysql-2.9.1.gem和休息的細節無法在Windows 8.1版本的Ruby 2.1.5
*當地的寶石*
的BigDecimal(1.2 0.4) IO-控制檯(0.4.2) JSON(1.8.1) MINITEST(4.7.5) MySQL的(2.8.1 x86的的mingw32) 迷幻(2.0.5) 耙(10.1.0) rdoc(4.1.0) 測試單元(2.1.5.0)
,當我安裝MySQL-2.9.1.gem它如下給人一種錯誤::
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>
Ruby Gems無法正常使用64位版本,所以你可以安裝32位版本,它可以正常工作..,剛纔我修復了.., – 2015-03-31 11:14:22
請參考這個網站一次 [link](https:/ /forwardhq.com/help/installing-ruby-windows) – 2015-03-31 11:14:37
我實際上安裝了一個64位版本,它工作正常 – FewFlyBy 2015-04-03 05:46:21