David Vallner
2/12/2006 7:07:00 PM
Dna Nedela 12 Február 2006 07:03 gao zhixin napísal:
> No more words, see the console text:
>
> Results logged to c:/ruby/lib/ruby/gems/1.8/gems/mysql-2.7/gem_make.out
>
> C:\>gem install --remote mysql
> Attempting remote installation of 'mysql'
> Building native extensions. This could take a while...
> ERROR: While executing gem ... (RuntimeError)
> ERROR: Failed to build gem native extension.
> Gem files will remain installed in
> c:/ruby/lib/ruby/gems/1.8/gems/mysql-2.7 for
> inspection.
> ruby extconf.rb install --remote mysql\nchecking for mysql_query() in
> mysqlcli
> ent.lib... no
> checking for main() in m.lib... yes
> checking for mysql_query() in mysqlclient.lib... no
> checking for main() in z.lib... no
> checking for mysql_query() in mysqlclient.lib... no
> checking for main() in socket.lib... no
> checking for mysql_query() in mysqlclient.lib... no
> checking for main() in nsl.lib... no
> checking for mysql_query() in mysqlclient.lib... no
>
>
> Results logged to c:/ruby/lib/ruby/gems/1.8/gems/mysql-2.7/gem_make.out
The MySQL driver apparently requires compilation of the native bindings. Do
you have a C compiler installed on your machine and the environment variables
properly setup for the MySQL includes and libraries?
And if you want to answer "Huh?" to the above paragraph, either use a win32
gem if one's available, ask the people maintaining the driver to make one,
use Cygwin for development, or switch to Postgres which already has prebuilt
mswin32 Ruby bindings available. <troll> Oh, and it also owns MySQL </troll>
David Vallner