# Mysql ruby deployment gem ...bla bla

**URL:** <https://www.ruby-forum.com/t/mysql-ruby-deployment-gem-bla-bla/173693>\
**Category:** Deployment\
**Created:** [August 13, 2009, 12:48pm UTC](https://www.ruby-forum.com/t/mysql-ruby-deployment-gem-bla-bla/173693 "2009-08-13T12:48:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasonwold](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e36b37/32.png) [@jasonwold](https://www.ruby-forum.com/u/jasonwold)\
**Post date:** [August 13, 2009, 12:48pm UTC](https://www.ruby-forum.com/t/mysql-ruby-deployment-gem-bla-bla/173693/1 "2009-08-13T12:48:09Z")

</div>

“gem install mysql” failed. This might be another stupid question, but  
really block me for couple of days.

I tried gem:  
gem install mysql – --with-mysql-config=/usr/bin/mysql\_config

and got:  
ERROR: Error installing mysql:  
ERROR: Failed to build gem native extension.

```
/usr/local/bin/ruby extconf.rb

```

–with-mysql-config=/usr/bin/mysql\_config  
extconf.rb:1: command not found: /usr/bin/mysql\_config --cflags  
\*\*\* extconf.rb failed \*\*\*

This might be something wrong with mysql becouse ‘mysql\_config’ can not  
be located.  
[root@localhost ~]# whereis mysql\_config  
mysql\_config:

I also tried mysql-ruby:  
[root@localhost mysql-ruby-2.8.1]# ruby extconf.rb  
–with-mysql-dir=/usr/bin/mysql  
checking for mysql\_query() in -lmysqlclient… no  
checking for main() in -lm… no  
checking for mysql\_query() in -lmysqlclient… no  
checking for main() in -lz… no  
checking for mysql\_query() in -lmysqlclient… no  
checking for main() in -lsocket… no  
checking for mysql\_query() in -lmysqlclient… no  
checking for main() in -lnsl… no  
checking for mysql\_query() in -lmysqlclient… no  
checking for main() in -lmygcc… no  
checking for mysql\_query() in -lmysqlclient… no  
\*\*\* extconf.rb failed \*\*\*

here is the env info:  
Linux version 2.6.18-128.4.1.el5PAE (removed\_email\_address@domain.invalid)  
(gcc version 4.1.2 20080704 (Red Hat 4.1.2-44)) #1 SMP Tue Aug 4  
20:58:34 EDT 2009

```
[root@localhost ~]# whereis mysql
mysql: /usr/bin/mysql /usr/local/lib/mysql /usr/share/mysql

```

/usr/share/man/man1/mysql.1.gz  
[root@localhost ~]# ruby -v  
ruby 1.8.6 (2008-03-03 patchlevel 114) [i686-linux]  
[root@localhost ~]# rails -v  
Rails 2.3.3  
[root@localhost ~]# gem -v  
1.3.5

any suggestion will be appreciate 🙂

---

<div class="post-metadata">

**Author:** ![jasonwold](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e36b37/32.png) [@jasonwold](https://www.ruby-forum.com/u/jasonwold)\
**Post date:** [August 13, 2009, 12:55pm UTC](https://www.ruby-forum.com/t/mysql-ruby-deployment-gem-bla-bla/173693/2 "2009-08-13T12:55:15Z")

</div>

Jason Wei wrote:

> This might be something wrong with mysql becouse ‘mysql\_config’ can not  
> be located.  
> [root@localhost ~]# whereis mysql\_config  
> mysql\_config:

Indeed, you are missing the MySQL client and (probably) development  
files. You should install them using your package manager and try again.

–  
Roderick van Domburg  
[http://en.railscluster.nl](http://en.railscluster.nl)

---

<div class="post-metadata">

**Author:** ![jasonwold](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e36b37/32.png) [@jasonwold](https://www.ruby-forum.com/u/jasonwold)\
**Post date:** [August 13, 2009, 1:08pm UTC](https://www.ruby-forum.com/t/mysql-ruby-deployment-gem-bla-bla/173693/3 "2009-08-13T13:08:57Z")

</div>

Roderick van Domburg wrote:

> Jason Wei wrote:
> 
> > This might be something wrong with mysql becouse ‘mysql\_config’ can not  
> > be located.  
> > [root@localhost ~]# whereis mysql\_config  
> > mysql\_config:
> 
> Indeed, you are missing the MySQL client and (probably) development  
> files. You should install them using your package manager and try again.
> 
> –  
> Roderick van Domburg  
> [http://en.railscluster.nl](http://en.railscluster.nl)

thx Roderick.  
could u give me hint. what exactly package I should install.

```
[root@localhost ~]# rpm -qa|grep -i mysql
MySQL-client-5.1.37-0.glibc23
MySQL-server-5.1.37-0.glibc23

```

---

<div class="post-metadata">

**Author:** ![jasonwold](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e36b37/32.png) [@jasonwold](https://www.ruby-forum.com/u/jasonwold)\
**Post date:** [August 13, 2009, 5:54pm UTC](https://www.ruby-forum.com/t/mysql-ruby-deployment-gem-bla-bla/173693/4 "2009-08-13T17:54:36Z")

</div>

Jason Wei wrote:

> Roderick van Domburg wrote:
> 
> > Jason Wei wrote:
> > 
> > > This might be something wrong with mysql becouse ‘mysql\_config’ can not  
> > > be located.  
> > > [root@localhost ~]# whereis mysql\_config  
> > > mysql\_config:
> > 
> > Indeed, you are missing the MySQL client and (probably) development  
> > files. You should install them using your package manager and try again.
> > 
> > –  
> > Roderick van Domburg  
> > [http://en.railscluster.nl](http://en.railscluster.nl)
> 
> thx Roderick.  
> could u give me hint. what exactly package I should install.
> 
> ```
> [root@localhost ~]# rpm -qa|grep -i mysql
> MySQL-client-5.1.37-0.glibc23
> MySQL-server-5.1.37-0.glibc23
> 
> ```

I reinstall the related rpm.

these are needed.

perl-DBD-MySQL-3.0007-2.el5  
mysql-5.0.45-7.el5  
mysql-server-5.0.45-7.el5  
mysql-devel-5.0.45-7.el5
