尝试安装mysql2 gem几天,让我告诉你我被困在哪里并描述我采取的步骤。
抛出错误的CMD命令是:gem install --http-proxy http://web1-proxy:8088 mysql2
!!
错误说明:
Error installing mysql2:
ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe extconf.rb
checking for ruby/thread.h... no
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
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lmygcc... no
checking for mysql_query() in -lmysqlclient... 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.
从一开始,我就安装了Ruby 1.9.3,然后安装了Rails 4.1.1。
我如何安装Ruby:
dir dk.rb
ruby dk.rb init
ruby dk.rb install
我如何安装rails:
gem install rails
set HTTP_PROXY=http://web1-proxy:8088
gem install --http-proxy http://web1-proxy:8088 rails
rails new app2
rails server
我为Mysql遵循的安装步骤:
安装后未启动MySql工作台
ODBC连接器5.3.2在安装mysql时无法安装,所以之后我遵循了这个解决方法:http://dev.mysql.com/downloads/connector/。单击“Connector / ODBC”链接。确保“选择平台”显示“Microsoft Windows”。单击MSI Installer的相应下载按钮。下载后运行.msi文件。
到目前为止我如何调试我的问题:
gem install --HTTP-PROXY http://web1-proxy:8088 mysql2 --no-rdoc --no-ri -- '--with-mysql-lib="C:\Program Files\MySQL\MySQL Server 5.6\lib\" --with-mysql-include="C:\Program Files\MySQL\MySQL Server 5.6\include\"'
- 没有运气帮助!!