# Mongrel error on debian sarge

**URL:** <https://www.ruby-forum.com/t/mongrel-error-on-debian-sarge/59059>\
**Category:** Rails\
**Created:** [April 28, 2006, 8:53am UTC](https://www.ruby-forum.com/t/mongrel-error-on-debian-sarge/59059 "2006-04-28T08:53:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jean-Christophe\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/6de8d8/32.png) [@Jean-Christophe\_M](https://www.ruby-forum.com/u/Jean-Christophe_M)\
**Post date:** [April 28, 2006, 8:53am UTC](https://www.ruby-forum.com/t/mongrel-error-on-debian-sarge/59059/1 "2006-04-28T08:53:15Z")

</div>

Hi,

I cannot get mongrel working on i686 debian sarge, whereas it works  
quite well on another ppc box under debian unstable.  
Instead I can use scgi\_rails or webbrick without any problem.  
Here is the error:

# mongrel\_rails start

/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/lib/mongrel/rails.rb:28:  
uninitialized constant Mongrel::HttpHandler (NameError)  
from  
/usr/local/lib/site\_ruby/1.8/rubygems/custom\_require.rb:21:in `require’  
from  
/usr/lib/ruby/gems/1.8/gems/mongrel-0.3.12.4/bin/mongrel\_rails:5

Here are the compilation log while updating gem to mongrel 0.3.12.4  
(ruby):

Building native extensions. This could take a while…  
Dans le fichier inclus à partir de http11.c:1:  
/usr/lib/ruby/1.8/i486-linux/ruby.h:28:21: stdlib.h : Aucun fichier ou  
répertoire de ce type  
/usr/lib/ruby/1.8/i486-linux/ruby.h:32:21: string.h : Aucun fichier ou  
répertoire de ce type  
/usr/lib/ruby/1.8/i486-linux/ruby.h:42:19: stdio.h : Aucun fichier ou  
répertoire de ce type  
/usr/lib/ruby/1.8/i486-linux/ruby.h:64:20: alloca.h : Aucun fichier ou  
répertoire de ce type  
Dans le fichier inclus à partir de  
/usr/lib/gcc-lib/i486-linux/3.3.5/include/syslimits.h:7,  
à partir de  
/usr/lib/gcc-lib/i486-linux/3.3.5/include/limits.h:11,  
à partir de /usr/lib/ruby/1.8/i486-linux/ruby.h:84,  
à partir de http11.c:1:  
/usr/lib/gcc-lib/i486-linux/3.3.5/include/limits.h:122:75: limits.h :  
Aucun fichier ou répertoire de ce type  
Dans le fichier inclus à partir de  
/usr/lib/ruby/1.8/i486-linux/ruby.h:677,  
à partir de http11.c:1:  
/usr/lib/ruby/1.8/i486-linux/missing.h:16:24: sys/time.h : Aucun fichier  
ou répertoire de ce type  
/usr/lib/ruby/1.8/i486-linux/missing.h:25:25: sys/types.h : Aucun  
fichier ou répertoire de ce type  
In file included from /usr/lib/ruby/1.8/i486-linux/ruby.h:678,  
from http11.c:1:  
/usr/lib/ruby/1.8/i486-linux/intern.h:215: error: erreur de syntaxe  
before “fd\_set”  
/usr/lib/ruby/1.8/i486-linux/intern.h:216: attention : `struct timeval' declared inside parameter list /usr/lib/ruby/1.8/i486-linux/intern.h:216: attention : its scope is only this definition or declaration, which is probably not what you want /usr/lib/ruby/1.8/i486-linux/intern.h:216: attention : parameter has incomplete type /usr/lib/ruby/1.8/i486-linux/intern.h:446: attention : noms de paramÃ¨tres (sans type) dans la déclaration de fonction Dans le fichier inclus à partir de http11.c:1: /usr/lib/ruby/1.8/i486-linux/ruby.h:687:21: pthread.h : Aucun fichier ou répertoire de ce type In file included from http11.c:1: /usr/lib/ruby/1.8/i486-linux/ruby.h:689: error: erreur de syntaxe before "rb_nativethread_t" /usr/lib/ruby/1.8/i486-linux/ruby.h:689: attention : type defaults to`int’ in declaration of `rb_nativethread_t' /usr/lib/ruby/1.8/i486-linux/ruby.h:689: attention : data definition has no type or storage class http11.c:3:20: assert.h : Aucun fichier ou répertoire de ce type http11.c:4:20: string.h : Aucun fichier ou répertoire de ce type Dans le fichier inclus à partir de http11.c:5: http11_parser.h:4:23: sys/types.h : Aucun fichier ou répertoire de ce type http11.c:6:19: ctype.h : Aucun fichier ou répertoire de ce type http11.c: Dans la fonction « http_field »: http11.c:72: attention : implicit declaration of function`toupper’  
http11.c: Dans la fonction « header\_done »:  
http11.c:144: attention : implicit declaration of function `strchr' http11.c:125: attention : unused variable`host’  
http11.c:126: attention : unused variable `port' http11.c: Dans la fonction « HttpParser_free »: http11.c:165: attention : implicit declaration of function`free’  
http11.c: Dans la fonction « URIClassifier\_alloc »:  
http11.c:333: attention : implicit declaration of function `assert' http11.c: Hors de toute fonction : http11.c:26: attention :`global\_interface\_value’ defined but not used  
make: \*\*\* [http11.o] Erreur 1  
Dans le fichier inclus à partir de http11.c:1:  
/usr/lib/ruby/1.8/i486-linux/ruby.h:28:21: stdlib.h : Aucun fichier ou  
répertoire de ce type  
/usr/lib/ruby/1.8/i486-linux/ruby.h:32:21: string.h : Aucun fichier ou  
répertoire de ce type  
/usr/lib/ruby/1.8/i486-linux/ruby.h:42:19: stdio.h : Aucun fichier ou  
répertoire de ce type  
/usr/lib/ruby/1.8/i486-linux/ruby.h:64:20: alloca.h : Aucun fichier ou  
répertoire de ce type  
Dans le fichier inclus Ã partir de  
/usr/lib/gcc-lib/i486-linux/3.3.5/include/syslimits.h:7,  
à partir de  
/usr/lib/gcc-lib/i486-linux/3.3.5/include/limits.h:11,  
à partir de /usr/lib/ruby/1.8/i486-linux/ruby.h:84,  
à partir de http11.c:1:  
/usr/lib/gcc-lib/i486-linux/3.3.5/include/limits.h:122:75: limits.h :  
Aucun fichier ou répertoire de ce type  
Dans le fichier inclus Ã partir de  
/usr/lib/ruby/1.8/i486-linux/ruby.h:677,  
à partir de http11.c:1:  
/usr/lib/ruby/1.8/i486-linux/missing.h:16:24: sys/time.h : Aucun fichier  
ou répertoire de ce type  
/usr/lib/ruby/1.8/i486-linux/missing.h:25:25: sys/types.h : Aucun  
fichier ou répertoire de ce type  
In file included from /usr/lib/ruby/1.8/i486-linux/ruby.h:678,  
from http11.c:1:  
/usr/lib/ruby/1.8/i486-linux/intern.h:215: error: erreur de syntaxe  
before “fd\_set”  
/usr/lib/ruby/1.8/i486-linux/intern.h:216: attention : `struct timeval' declared inside parameter list /usr/lib/ruby/1.8/i486-linux/intern.h:216: attention : its scope is only this definition or declaration, which is probably not what you want /usr/lib/ruby/1.8/i486-linux/intern.h:216: attention : parameter has incomplete type /usr/lib/ruby/1.8/i486-linux/intern.h:446: attention : noms de paramÃ¨tres (sans type) dans la déclaration de fonction Dans le fichier inclus Ã partir de http11.c:1: /usr/lib/ruby/1.8/i486-linux/ruby.h:687:21: pthread.h : Aucun fichier ou répertoire de ce type In file included from http11.c:1: /usr/lib/ruby/1.8/i486-linux/ruby.h:689: error: erreur de syntaxe before "rb_nativethread_t" /usr/lib/ruby/1.8/i486-linux/ruby.h:689: attention : type defaults to`int’ in declaration of `rb_nativethread_t' /usr/lib/ruby/1.8/i486-linux/ruby.h:689: attention : data definition has no type or storage class http11.c:3:20: assert.h : Aucun fichier ou répertoire de ce type http11.c:4:20: string.h : Aucun fichier ou répertoire de ce type Dans le fichier inclus à partir de http11.c:5: http11_parser.h:4:23: sys/types.h : Aucun fichier ou répertoire de ce type http11.c:6:19: ctype.h : Aucun fichier ou répertoire de ce type http11.c: Dans la fonction « http_field »: http11.c:72: attention : implicit declaration of function`toupper’  
http11.c: Dans la fonction « header\_done »:  
http11.c:144: attention : implicit declaration of function `strchr' http11.c:125: attention : unused variable`host’  
http11.c:126: attention : unused variable `port' http11.c: Dans la fonction « HttpParser_free »: http11.c:165: attention : implicit declaration of function`free’  
http11.c: Dans la fonction « URIClassifier\_alloc »:  
http11.c:333: attention : implicit declaration of function `assert' http11.c: Hors de toute fonction : http11.c:26: attention :`global\_interface\_value’ defined but not used  
make: \*\*\* [http11.o] Erreur 1  
ruby extconf.rb update mongrel  
checking for main() in -lc… no  
creating Makefile

make  
gcc -fPIC -Wall -g -O2 -fPIC -I. -I/usr/lib/ruby/1.8/i486-linux  
-I/usr/lib/ruby/1.8/i486-linux -I. -c http11.c

make install  
gcc -fPIC -Wall -g -O2 -fPIC -I. -I/usr/lib/ruby/1.8/i486-linux  
-I/usr/lib/ruby/1.8/i486-linux -I. -c http11.c  
Successfully installed mongrel-0.3.12.4  
Installing RDoc documentation for mongrel-0.3.12.4…  
Gems: [mongrel] updated

Here are the installed libs:

# dpkg --get-selections | grep ruby

libbreakpoint-ruby1.8 install  
libbz2-ruby1.8 install  
libcmd-ruby1.8 install  
libcmdparse2-ruby install  
libdaemonize-ruby1.8 install  
libdbd-mysql-ruby1.8 install  
libdbd-odbc-ruby1.8 install  
libdbd-pg-ruby1.8 install  
libdbi-ruby1.8 install  
libgettext-ruby-util install  
libgettext-ruby1.8 install  
libldap-ruby1.8 install  
liblocale-ruby1.8 install  
libmysql-ruby1.8 install  
libodbc-ruby1.8 install  
libopenssl-ruby1.8 install  
libpgsql-ruby1.8 install  
libreadline-ruby1.8 install  
librmagick-ruby1.8 install  
libruby1.8 install  
libruby1.8-dbg install  
libxml-parser-ruby1.8 install  
libxml-ruby install  
libxml-ruby1.8 install  
ruby install  
ruby1.8 install  
ruby1.8-dev install  
ruby1.8-examples install  
vim-ruby install

–  
Jean-Christophe M.

---

<div class="post-metadata">

**Author:** ![Jean-Christophe\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/6de8d8/32.png) [@Jean-Christophe\_M](https://www.ruby-forum.com/u/Jean-Christophe_M)\
**Post date:** [April 28, 2006, 2:36pm UTC](https://www.ruby-forum.com/t/mongrel-error-on-debian-sarge/59059/2 "2006-04-28T14:36:27Z")

</div>

Mongrel requires Ruby 1.8.4. Debian Stable install 1.8.2. Did you  
install 1.8.4? Run: ruby --version to discover it.

Try googling install debian ruby 1.8.4 if you didn’t to learn how  
to do it.

Cheers.

Benigno Uria

---

<div class="post-metadata">

**Author:** ![Jean-Christophe\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/6de8d8/32.png) [@Jean-Christophe\_M](https://www.ruby-forum.com/u/Jean-Christophe_M)\
**Post date:** [April 28, 2006, 4:26pm UTC](https://www.ruby-forum.com/t/mongrel-error-on-debian-sarge/59059/3 "2006-04-28T16:26:54Z")

</div>

Benigno Uria wrote:

> Mongrel requires Ruby 1.8.4. Debian Stable install 1.8.2. Did you  
> install 1.8.4? Run: ruby --version to discover it.

The sarge box runs  
$ ruby -v  
ruby 1.8.4 (2005-12-24) [i486-linux]

> Try googling install debian ruby 1.8.4 if you didn’t to learn how  
> to do it.

Thks, but as I told you I have mongrel running here in dev, so I know  
the requirements 😉 The dev box here runs exactly the same package,  
ruby 1.8.4 from 2005-12-24, but for ppc.

–  
Jean-Christophe M.

---

<div class="post-metadata">

**Author:** ![Jean-Christophe\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/6de8d8/32.png) [@Jean-Christophe\_M](https://www.ruby-forum.com/u/Jean-Christophe_M)\
**Post date:** [April 28, 2006, 6:40pm UTC](https://www.ruby-forum.com/t/mongrel-error-on-debian-sarge/59059/4 "2006-04-28T18:40:10Z")

</div>

I am running mongrel on Debian Sarge with ruby.1.8.4 without any  
problems.  
I used debuild to create 1.8.4 debs from sid sources. Afterwards I did  
a  
gem install mongrel -t

I prefer using gem to install gems with the -t flag so unit tests are  
run which show any problems.

I vaguely remember reading folks running into problems if the orig  
ruby was built from sources also. (mine was installed from binary  
debs) I think the solution was to remove ALL ruby related packages,  
debuild the 1.8.4 version and install the newer debs. You may want to  
google on that.  
Hope it helps,

-bakki

---

<div class="post-metadata">

**Author:** ![Jean-Christophe\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/6de8d8/32.png) [@Jean-Christophe\_M](https://www.ruby-forum.com/u/Jean-Christophe_M)\
**Post date:** [May 3, 2006, 7:11pm UTC](https://www.ruby-forum.com/t/mongrel-error-on-debian-sarge/59059/5 "2006-05-03T19:11:07Z")

</div>

Bakki K. wrote:

> I am running mongrel on Debian Sarge with ruby.1.8.4 without any problems.  
> I used debuild to create 1.8.4 debs from sid sources. Afterwards I did a  
> gem install mongrel -t
> 
> I prefer using gem to install gems with the -t flag so unit tests are  
> run which show any problems.

Thks.  
I upgraded gcc to 4.0.3 (from testing) and then the mongrel http11  
compilation went better. Once the compilation log became errorless,  
mongrel worked well.
