# Gem1.9 install mysql on ruby 1.9.1p129 failed

**URL:** <https://www.ruby-forum.com/t/gem1-9-install-mysql-on-ruby-1-9-1p129-failed/172067>\
**Category:** Ruby\
**Created:** [July 14, 2009, 4:03am UTC](https://www.ruby-forum.com/t/gem1-9-install-mysql-on-ruby-1-9-1p129-failed/172067 "2009-07-14T04:03:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![geistteufel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ba8739/32.png) [@geistteufel](https://www.ruby-forum.com/u/geistteufel)\
**Post date:** [July 14, 2009, 4:03am UTC](https://www.ruby-forum.com/t/gem1-9-install-mysql-on-ruby-1-9-1p129-failed/172067/1 "2009-07-14T04:03:08Z")

</div>

Hi,

I’m trying to install mysql gem on ruby 1.9.1p129.

Here the result : (do in root)

gem1.9 install mysql – --with-mysql-config=/usr/bin/mysql\_config  
GET 304 Not Modified: [RubyGems.org | your community gem host](http://gems.rubyforge.org/latest_specs.4.8.gz)  
Installing gem mysql-2.7  
/usr/lib/ruby1.9/gems/1.9.1/gems/mysql-2.7/COPYING  
/usr/lib/ruby1.9/gems/1.9.1/gems/mysql-2.7/COPYING.ja  
/usr/lib/ruby1.9/gems/1.9.1/gems/mysql-2.7/README.html  
/usr/lib/ruby1.9/gems/1.9.1/gems/mysql-2.7/README\_ja.html  
/usr/lib/ruby1.9/gems/1.9.1/gems/mysql-2.7/extconf.rb  
/usr/lib/ruby1.9/gems/1.9.1/gems/mysql-2.7/mysql.c.in  
/usr/lib/ruby1.9/gems/1.9.1/gems/mysql-2.7/test.rb  
/usr/lib/ruby1.9/gems/1.9.1/gems/mysql-2.7/tommy.css  
/usr/lib/ruby1.9/gems/1.9.1/gems/mysql-2.7/mysql.gemspec  
Building native extensions. This could take a while…  
ERROR: Error installing mysql:  
ERROR: Failed to build gem native extension.

/usr/bin/ruby1.9 extconf.rb install mysql –  
–with-mysql-config=/usr/bin/mysql\_config  
checking for mysql\_ssl\_set()… yes  
checking for mysql.h… yes  
creating Makefile

make  
gcc -I. -I/usr/include/ruby1.9-1.9.1/x86\_64-linux  
-I/usr/include/ruby1.9-1.9.1/ruby/backward -I/usr/include/ruby1.9-1.9.1  
-I. -DHAVE\_MYSQL\_SSL\_SET -DHAVE\_MYSQL\_H -I/usr/include/mysql  
-DBIG\_JOINS=1 -fPIC -fno-strict-aliasing -DUNIV\_LINUX -fPIC -g -O2 -O2  
-g -Wall -Wno-parentheses -fPIC -o mysql.o -c mysql.c  
mysql.c:6:21: erreur: version.h : Aucun fichier ou dossier de ce type  
mysql.c: In function ‘make\_field\_obj’:  
mysql.c:185: attention : unused variable ‘hash’  
mysql.c: In function ‘escape\_string’:  
mysql.c:267: erreur: ‘struct RString’ has no member named ‘len’  
mysql.c:268: erreur: ‘struct RString’ has no member named ‘len’  
mysql.c:268: erreur: ‘struct RString’ has no member named ‘ptr’  
mysql.c:268: erreur: ‘struct RString’ has no member named ‘ptr’  
mysql.c:268: erreur: ‘struct RString’ has no member named ‘len’  
mysql.c: In function ‘real\_escape\_string’:  
mysql.c:401: erreur: ‘struct RString’ has no member named ‘len’  
mysql.c:402: erreur: ‘struct RString’ has no member named ‘len’  
mysql.c:402: erreur: ‘struct RString’ has no member named ‘ptr’  
mysql.c:402: erreur: ‘struct RString’ has no member named ‘ptr’  
mysql.c:402: erreur: ‘struct RString’ has no member named ‘len’  
mysql.c: In function ‘query’:  
mysql.c:710: erreur: ‘struct RString’ has no member named ‘ptr’  
mysql.c:710: erreur: ‘struct RString’ has no member named ‘len’  
mysql.c:729: erreur: ‘struct RString’ has no member named ‘ptr’  
mysql.c:729: erreur: ‘struct RString’ has no member named ‘len’  
mysql.c: In function ‘query\_with\_result\_set’:  
mysql.c:882: attention : implicit declaration of function ‘TypeError’  
mysql.c: In function ‘fetch\_field\_direct’:  
mysql.c:960: attention : implicit declaration of function ‘Raise’  
mysql.c: In function ‘fetch\_hash2’:  
mysql.c:1032: erreur: ‘struct RString’ has no member named ‘ptr’  
mysql.c:1033: erreur: ‘struct RString’ has no member named ‘ptr’  
mysql.c: In function ‘field\_inspect’:  
mysql.c:1157: erreur: ‘struct RString’ has no member named ‘len’  
mysql.c:1158: erreur: ‘struct RString’ has no member named ‘ptr’  
mysql.c:1158: erreur: ‘struct RString’ has no member named ‘ptr’  
mysql.c: In function ‘stmt\_bind\_result’:  
mysql.c:1284: erreur: ‘struct RString’ has no member named ‘ptr’  
mysql.c: In function ‘stmt\_execute’:  
mysql.c:1346: erreur: ‘struct RString’ has no member named ‘ptr’  
mysql.c:1347: erreur: ‘struct RString’ has no member named ‘len’  
mysql.c:1348: erreur: ‘struct RString’ has no member named ‘len’  
mysql.c:1359: erreur: ‘struct RArray’ has no member named ‘ptr’  
mysql.c:1360: erreur: ‘struct RArray’ has no member named ‘ptr’  
mysql.c:1361: erreur: ‘struct RArray’ has no member named ‘ptr’  
mysql.c:1362: erreur: ‘struct RArray’ has no member named ‘ptr’  
mysql.c:1363: erreur: ‘struct RArray’ has no member named ‘ptr’  
mysql.c:1364: erreur: ‘struct RArray’ has no member named ‘ptr’  
mysql.c:1316: attention : unused variable ‘false’  
mysql.c: In function ‘stmt\_prepare’:  
mysql.c:1584: erreur: ‘struct RString’ has no member named ‘ptr’  
mysql.c:1584: erreur: ‘struct RString’ has no member named ‘len’  
make: \*\*\* [mysql.o] Erreur 1

So, it seems “version.h” is missing. I have install  
“libmysqlclient16-dev” because I’m using mysql 5.1.

I have found mysql\_version.h in package.

Did I miss another package ?

---

<div class="post-metadata">

**Author:** ![geistteufel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ba8739/32.png) [@geistteufel](https://www.ruby-forum.com/u/geistteufel)\
**Post date:** [July 14, 2009, 4:11am UTC](https://www.ruby-forum.com/t/gem1-9-install-mysql-on-ruby-1-9-1p129-failed/172067/2 "2009-07-14T04:11:58Z")

</div>

> gem1.9 install mysql – --with-mysql-config=/usr/bin/mysql\_config  
> GET 304 Not Modified: [RubyGems.org | your community gem host](http://gems.rubyforge.org/latest_specs.4.8.gz)  
> Installing gem mysql-2.7  
> /usr/lib/ruby1.9/gems/1.9.1/gems/mysql-2.7/COPYING

You’re going to want to install version 2.8.1 for ruby 1.9

or perhaps  
sudo gem install hectoregm-mysql-ruby  
gleaned from  
[http://isitruby19.com/mysql](http://isitruby19.com/mysql)  
=r

---

<div class="post-metadata">

**Author:** ![geistteufel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ba8739/32.png) [@geistteufel](https://www.ruby-forum.com/u/geistteufel)\
**Post date:** [July 14, 2009, 11:49am UTC](https://www.ruby-forum.com/t/gem1-9-install-mysql-on-ruby-1-9-1p129-failed/172067/3 "2009-07-14T11:49:23Z")

</div>

Roger P. a Ã©crit :

> gleaned from  
> [Page not found • World Affairs Council of Cincinnati and Northern Kentucky-OPE体育电竞](http://isitruby19.com/mysql)  
> =r

Ok I see

What’s the difference between hectoregm-mysql-ruby and mysql-2.8.1 ?

---

<div class="post-metadata">

**Author:** ![geistteufel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ba8739/32.png) [@geistteufel](https://www.ruby-forum.com/u/geistteufel)\
**Post date:** [July 14, 2009, 2:51pm UTC](https://www.ruby-forum.com/t/gem1-9-install-mysql-on-ruby-1-9-1p129-failed/172067/4 "2009-07-14T14:51:25Z")

</div>

> Thanks ! hectoregm-mysql-ruby works !  
> Did I miss a source repository ?

gem sources -a [http://gems.github.com](http://gems.github.com)  
🙂

---

<div class="post-metadata">

**Author:** ![geistteufel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ba8739/32.png) [@geistteufel](https://www.ruby-forum.com/u/geistteufel)\
**Post date:** [July 14, 2009, 7:00pm UTC](https://www.ruby-forum.com/t/gem1-9-install-mysql-on-ruby-1-9-1p129-failed/172067/5 "2009-07-14T19:00:40Z")

</div>

Roger P. a Ã©crit :

> > Thanks ! hectoregm-mysql-ruby works !  
> > Did I miss a source repository ?
> 
> gem sources -a [http://gems.github.com](http://gems.github.com)  
> 🙂

ok I see.  
I’m just starting learning myself rails. And well, I’m starting by  
installing lastest ruby (over package here  
[http://blog.celogeek.fr/linux/celogeek-ubuntu-jaunty-repos/](http://blog.celogeek.fr/linux/celogeek-ubuntu-jaunty-repos/) I have  
made).  
So now, installing rails is ok. Installing passenger is ok. I need mysql  
connection. So it’s my first issue.  
Thanks for your help.

---

<div class="post-metadata">

**Author:** ![geistteufel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ba8739/32.png) [@geistteufel](https://www.ruby-forum.com/u/geistteufel)\
**Post date:** [July 14, 2009, 12:05pm UTC](https://www.ruby-forum.com/t/gem1-9-install-mysql-on-ruby-1-9-1p129-failed/172067/6 "2009-07-14T12:05:45Z")

</div>

geistteufel a Ã©crit :

> > sudo gem install hectoregm-mysql-ruby  
> > gleaned from  
> > [Page not found • World Affairs Council of Cincinnati and Northern Kentucky-OPE体育电竞](http://isitruby19.com/mysql)  
> > =r
> 
> Ok I see
> 
> What’s the difference between hectoregm-mysql-ruby and mysql-2.8.1 ?

Thanks ! hectoregm-mysql-ruby works !

I have clone the git repos and build the gem. After that I have install  
it.  
So it’s working !

It’s not in gem global repository yet. gem install hectoregm-mysql-ruby  
doesn’t work.  
Did I miss a source repository ?
