问题的宝石Windows服务器上安装mysql 2008 R2
问题描述:
轨2.3.5版 红宝石版本1.8.7问题的宝石Windows服务器上安装mysql 2008 R2
PS C:\Ruby187\apps\redmine> gem install mysql
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
C:/Ruby187/bin/ruby.exe extconf.rb
checking for main() in -llibmysql... no
*** 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
--without-mysql-include=${mysql-dir}/include
--with-mysql-lib
--without-mysql-lib=${mysql-dir}/lib
--with-libmysqllib
--without-libmysqllib
Gem files will remain installed in C:/Ruby187/lib/ruby/gems/1.8/gems/mysql-2.8.1 for inspection.
Results logged to C:/Ruby187/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out
答
已经有mysql的2.8.1创业板rubygems.org的预构建的二进制:
https://rubygems.org/gems/mysql/versions/2.8.1-x86-mingw32
除非你强迫在这种情况下--platform=ruby
你需要MySQL的头文件和链接库。
您还需要RubyInstaller DevKit,如果这是您尝试使用的Ruby版本。
看到这个职位在我们的小组here
我曾尝试预创建二进制,并得到了同样的错误 – Eldar 2011-03-15 19:42:06
这是不可能的,除非你手动下载的mysql-2.8.1.gem文件并放置在所相同的目录,你正在调用gem install,这是唯一可能触发这个(本地安装) – 2011-03-16 00:09:49
我已经手动下载了宝石,没有任何变化,仍然是相同的错误 – Eldar 2011-03-16 11:57:12