Problem installing mysql in windows

(Andres M. Hidalgo) #1

I got the following error installing mysql using command:
gem install mysql --remote

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.6 for
inspection.
   ruby extconf.rb install mysql --remote\nchecking for mysql_query() in mysqlclient.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.6/gem_make.out

Any ideas how to fix this problem?.

Thanks

Andres

(Lennon Day-Reynolds) #2

The 'mysql' gem only provides the Ruby bindings to the MySQL client API
-- you have to separately install the MySQL libraries for your system.
I'm going to go out on a limb and assume you're trying to run Ruby on
Rails, (and hence posted this question here) you'll probably want the
full MySQL server installation, as well.

Basically, go to mysql.com, download the latest Windows distribution,
and make sure your MySQL install is working before trying to install
the Ruby bindings.

-Lennon

(Christopher Aldridge) #3

Andres, I experienced the same problem and got no where. If you figure
it out, please let me know. Here's my original post:

···

All, I'm having a very tuff time getting this mysql module working on
XP. All searches yeild how to's that were last updated in 2003, or
linux only environments.

Anyone here know an exact method of getting this working?

(note, I've tried non 2.7-beta2 versions of this module and other
versions of mysql to no avail)

C:\mysql-ruby-2.7-beta2>extconf.rb
checking for mysql_query() in mysqlclient.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

C:\mysql-ruby-2.7-beta2>extconf.rb --with-mysql-dir=c:/mysql
checking for mysql_query() in mysqlclient.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

C:\mysql-ruby-2.7-beta2>mysql --version
mysql Ver 14.7 Distrib 4.1.13a, for Win32 (ia32)
C:\mysql-ruby-2.7-beta2>
HELP!! :slight_smile:

On 8/19/05, rcoder <rcoder@gmail.com> wrote:

The 'mysql' gem only provides the Ruby bindings to the MySQL client API
-- you have to separately install the MySQL libraries for your system.
I'm going to go out on a limb and assume you're trying to run Ruby on
Rails, (and hence posted this question here) you'll probably want the
full MySQL server installation, as well.

Basically, go to mysql.com, download the latest Windows distribution,
and make sure your MySQL install is working before trying to install
the Ruby bindings.

-Lennon

(Abraham Tio) #4

have you tried other versions of mysql-ruby ?
i got the same output until i tried a few different versions and then found to my amazement that version 2.5.1 worked.

Christopher Aldridge wrote:

···

Andres, I experienced the same problem and got no where. If you figure
it out, please let me know. Here's my original post:

All, I'm having a very tuff time getting this mysql module working on
XP. All searches yeild how to's that were last updated in 2003, or
linux only environments.

Anyone here know an exact method of getting this working?

(note, I've tried non 2.7-beta2 versions of this module and other
versions of mysql to no avail)

C:\mysql-ruby-2.7-beta2>extconf.rb
checking for mysql_query() in mysqlclient.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

C:\mysql-ruby-2.7-beta2>extconf.rb --with-mysql-dir=c:/mysql
checking for mysql_query() in mysqlclient.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

C:\mysql-ruby-2.7-beta2>mysql --version
mysql Ver 14.7 Distrib 4.1.13a, for Win32 (ia32)
C:\mysql-ruby-2.7-beta2>
HELP!! :slight_smile:
     
On 8/19/05, rcoder <rcoder@gmail.com> wrote:

The 'mysql' gem only provides the Ruby bindings to the MySQL client API
-- you have to separately install the MySQL libraries for your system.
I'm going to go out on a limb and assume you're trying to run Ruby on
Rails, (and hence posted this question here) you'll probably want the
full MySQL server installation, as well.

Basically, go to mysql.com, download the latest Windows distribution,
and make sure your MySQL install is working before trying to install
the Ruby bindings.

-Lennon