开发者

Rails 3.0.3, Ruby 1.8.7 (Cygwin), Windows 7 64-bit, MySQL 5.5. - MySQL gem fails to install

I'm trying to install the MySQL Gem for Ruby on Rails on Windows 7 64-bit. I've installed MySQL Essential 5.1.54 Winx64 from the MySQL website. I've installed Cygwin, which comes with ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-cygwin]. I've installed Rails 3.0.3 from the rails website. When I do 'gem install mysql', it outputs:

Building native extensions.   This could take a while...
ERROR:  Error installing mysql:
        ERROR: Failed to build gem native extension

/usr/bin/ruby.exe extconf.rb
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... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsnl... 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 n开发者_如何学Goot 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.

I've downloaded the Instant Rails libmySQL.dll and replaced that in my MySQL directory(C:\Program Files\MySQL\MySQL Server 5.1\bin). I have a /etc/my.cnf that points to using 127.0.0.1 as the mysql host. I can connect to mysql in my cygwin bash shell. I can connect to mysql in a Command Prompt window. I can start rails using SQLite3 as the database. I've tried supplying --with-mysql-dir=C:\Program Files\MySQL\MySQL Server 5.1\bin to the gem install.


try --with-mysql-dir=C:\Program Files\MySQL\MySQL Server 5.1, good luck!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜