Problems installing mysql-gem

Hi.

I have been trying to install the mysql-gem with the inatllation
instructions from hivelogic. After running the

sudo gem install mysql – --with-mysql-dir=/usr/local/mysql

I get the following error:


jekyll:/usr/local/src emil$ sudo gem install mysql –
–with-mysql-dir=/usr/local/mysql
Password:
Select which gem to install for your platform (i686-darwin8.9.1)

  1. mysql 2.7.3 (mswin32)
  2. mysql 2.7.1 (mswin32)
  3. mysql 2.7 (ruby)
  4. mysql 2.6 (ruby)
  5. Skip this gem
  6. Cancel installation

3
Building native extensions. This could take a while…
ERROR: While executing gem … (Gem::Installer::ExtensionBuildError)
ERROR: Failed to build gem native extension.

ruby extconf.rb install mysql – --with-mysql-dir=/usr/local/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… yes
checking for mysql_ssl_set()… yes
checking for mysql.h… yes
creating Makefile

make
gcc -I. -I. -I/usr/local/lib/ruby/1.8/i686-darwin8.9.1 -I.
-DHAVE_MYSQL_SSL_SET -DHAVE_MYSQL_H -I/usr/local/mysql/include
-fno-common -g -O2 -pipe -fno-common -c mysql.c
mysql.c: In function ‘query’:
mysql.c:635: error: invalid storage class for function ‘res_free’
mysql.c:637: error: ‘res_free’ undeclared (first use in this function)
mysql.c:637: error: (Each undeclared identifier is reported only once
mysql.c:637: error: for each function it appears in.)
mysql.c: In function ‘Init_mysql’:
mysql.c:1299: error: ‘ulong’ undeclared (first use in this function)
mysql.c:1299: error: parse error before numeric constant
mysql.c:1302: error: parse error before numeric constant
make: *** [mysql.o] Error 1


I currently have mysql 5.x installed. Does anyone of you know this
error?

Thank you.
Emil

Hola,

Does anyone of you know this error?
I guess I do.

I bet you are on Ubuntu… Try this:

sudo apt-get install build-essential ruby1.8-dev

I am pretty sure you are missing at least one of these packages
(According to the error, it seems ruby1.8-dev).

If this still does not help (but I am almost sure it will), just ping
me, we will try to find out something.

Have a nice day,
Peter
__
http://www.rubyrailways.com :: Ruby and Web2.0 blog
http://scrubyt.org :: Ruby web scraping framework
http://rubykitchensink.ca/ :: The indexed archive of all things Ruby

Hi Peter.
Thank you for replying, im not using debian, im istalling on my os x
intel-mac.

On 4/30/07, Emil K. [email protected] wrote:

In that case, I’d install ruby and rubygems using Macports. It’s a snap
after that.

On 4/30/07, Emil K. [email protected] wrote:

Hi Peter.
Thank you for replying, im not using debian, im istalling on my os x
intel-mac.

i have always followed JDD’s sandboxing rails with macports instructions
without issue:
http://blog.duncandavidson.com/2006/04/sandboxing_rail.html

cheers,
jean-pierre

I’m trying to install the mysql gem. I have mysql up and running,
everything is up to date through yum in fedora, fc6.

[[email protected] ~]#
[[email protected] ~]# gem install mysql -y
Select which gem to install for your platform (i386-linux)

  1. mysql 2.7.3 (mswin32)
  2. mysql 2.7.1 (mswin32)
  3. mysql 2.7 (ruby)
  4. mysql 2.6 (ruby)
  5. Skip this gem
  6. Cancel installation

3

Building native extensions. This could take a while…
ERROR: While executing gem … (Gem::Installer::ExtensionBuildError)
ERROR: Failed to build gem native extension.

ruby extconf.rb install mysql -y
can’t find header files for ruby.

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
[[email protected] ~]#
[[email protected] ~]# cat /etc/fedora-release
Fedora Core release 6 (Zod)
[[email protected] ~]#
[[email protected] ~]# date
Sun May 13 08:01:18 BST 2007
[[email protected] ~]#
[[email protected] ~]#

thanks,

Thufir

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs