Gem install mysql

I’m having some problems installing the MySQL Ruby gem here on Cygwin.
Anybody know what’s up?

$ uname -a
CYGWIN_NT-5.1 papaia 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygwin

$ gem install mysql
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 install mysql
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 -lnsl… 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.

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=/usr/bin/ruby
–with-mysql-config
–without-mysql-config
–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-mysqlclientlib
–without-mysqlclientlib
–with-mlib
–without-mlib
–with-mysqlclientlib
–without-mysqlclientlib
–with-zlib
–without-zlib
–with-mysqlclientlib
–without-mysqlclientlib
–with-socketlib
–without-socketlib
–with-mysqlclientlib
–without-mysqlclientlib
–with-nsllib
–without-nsllib
–with-mysqlclientlib
–without-mysqlclientlib

Gem files will remain installed in
/usr/lib/ruby/gems/1.8/gems/mysql-2.7 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/mysql-2.7/gem_make.out

I guess this is a bit pathetic:

$ gem install mysql – --with-mysql-config="/cygdrive/c/Program
Files/MySQL/MySQL Server 5.0/bin/MySQLInstanceConfig.exe"
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 install mysql –
–with-mysql-config=/cygdrive/c/Program Files/MySQL/MySQL Server
5.0/bin/MySQLInstanceConfig.exe
extconf.rb:1: command not found: /cygdrive/c/Program --cflags
*** 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=/usr/bin/ruby
–with-mysql-config

Gem files will remain installed in
/usr/lib/ruby/gems/1.8/gems/mysql-2.7 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/mysql-2.7/gem_make.out

On Sep 29, 7:16 pm, Redd V. [email protected] wrote:

*** extconf.rb failed ***
–without-opt-lib=${opt-dir}/lib
–without-mysql-include=${mysql-dir}/include
–with-mysqlclientlib
Gem files will remain installed in

    --with-opt-dir
    --with-mysql-config

Gem files will remain installed in
/usr/lib/ruby/gems/1.8/gems/mysql-2.7 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/mysql-2.7/gem_make.out

http://www.home.no/reddvinylene

you need mysql source files to be able to build the mysql ruby gem.
There are lot of information dealing with this cygwin issue. Try
google it.
For start look at:

On Mon, Sep 29, 2008 at 10:04 PM, Dejan D. [email protected]
wrote:

you need mysql source files to be able to build the mysql ruby gem.
There are lot of information dealing with this cygwin issue. Try
google it.
For start look at: Xiaobo On Rails: Run Ruby, Gems, Rails, MySQL and RMagick on Cygwin

Thank you so much man :wink: