the problem of install mysql driver using gem for Rails

G

gao zhixin

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
 
D

David Vallner

D=C5=88a Nede=C4=BEa 12 Febru=C3=A1r 2006 07:03 gao zhixin nap=C3=ADsal:
No more words, see the console text=EF=BC=9A

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=
=20
you have a C compiler installed on your machine and the environment variabl=
es=20
properly setup for the MySQL includes and libraries?

And if you want to answer "Huh?" to the above paragraph, either use a win32=
=20
gem if one's available, ask the people maintaining the driver to make one,=
=20
use Cygwin for development, or switch to Postgres which already has prebuil=
t=20
mswin32 Ruby bindings available. <troll> Oh, and it also owns MySQL </troll>

David Vallner
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,829
Latest member
PIXThurman

Latest Threads

Top