Having trouble installing the Mongrel gem!

Hi list,
I'm using the latest version of RVM with ruby 1.9.2
I'm running Ubuntu Maverick.

When running 'gem install mongrel' I am getting the following error:

ERROR: Error installing mongrel:
ERROR: Failed to build gem native extension.

/usr/local/rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb
checking for main() in -lc... yes
creating Makefile

make
gcc -I. -I/usr/local/rvm/rubies/ruby-1.9.2-p180/include/ruby-1.9.1/i686-linux -I/usr/local/rvm/rubies/ruby-1.9.2-p180/include/ruby-1.9.1/ruby/backward -I/usr/local/rvm/rubies/ruby-1.9.2-p180/include/ruby-1.9.1 -I. -D_FILE_OFFSET_BITS=64 -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -o http11_parser.o -c http11_parser.c
http11_parser.rl: In function ‘http_parser_execute’:
http11_parser.rl:105: warning: comparison between signed and unsigned integer expressions
gcc -I. -I/usr/local/rvm/rubies/ruby-1.9.2-p180/include/ruby-1.9.1/i686-linux -I/usr/local/rvm/rubies/ruby-1.9.2-p180/include/ruby-1.9.1/ruby/backward -I/usr/local/rvm/rubies/ruby-1.9.2-p180/include/ruby-1.9.1 -I. -D_FILE_OFFSET_BITS=64 -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -o http11.o -c http11.c
http11.c: In function ‘http_field’:
http11.c:70: warning: format not a string literal and no format arguments
http11.c:71: warning: format not a string literal and no format arguments
http11.c:77: error: ‘struct RString’ has no member named ‘ptr’
http11.c:77: error: ‘struct RString’ has no member named ‘len’
http11.c: In function ‘request_uri’:
http11.c:102: warning: format not a string literal and no format arguments
http11.c: In function ‘fragment’:
http11.c:113: warning: format not a string literal and no format arguments
http11.c: In function ‘request_path’:
http11.c:124: warning: format not a string literal and no format arguments
http11.c: In function ‘query_string’:
http11.c:135: warning: format not a string literal and no format arguments
http11.c: In function ‘header_done’:
http11.c:172: error: ‘struct RString’ has no member named ‘ptr’
http11.c:174: error: ‘struct RString’ has no member named ‘ptr’
http11.c:176: error: ‘struct RString’ has no member named ‘ptr’
http11.c:177: error: ‘struct RString’ has no member named ‘len’
http11.c: In function ‘HttpParser_execute’:
http11.c:298: error: ‘struct RString’ has no member named ‘ptr’
http11.c:299: error: ‘struct RString’ has no member named ‘len’
http11.c:307: warning: format not a string literal and no format arguments
make: *** [http11.o] Error 1

Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.2-p180/gems/mongrel-1.1.5 for inspection.
Results logged to /usr/local/rvm/gems/ruby-1.9.2-p180/gems/mongrel-1.1.5/ext/http11/gem_make.out

I know the answer is probably somewhere in the above output, but I just can't see it. I need to get this installed pretty fast, as having an issue with webrick not handling file uploading when running in daemon mode. I want to test Mongrel to see if solves my problem before I go messing around with complex unicorn proxy apache setups etc.

Any help would be very very great!

Thanks in advance,
Jen!

I wouldn't be using the mongrel gem. It's a very old gem and I don't think
it's even supported on 1.9.2

I'd suggest taking a look at thin or unicorn

HTH
Daniel

···

On 6 July 2011 09:59, Jen <jen.bottom@gmail.com> wrote:

Hi list,
I'm using the latest version of RVM with ruby 1.9.2
I'm running Ubuntu Maverick.

When running 'gem install mongrel' I am getting the following error:

ERROR: Error installing mongrel:
ERROR: Failed to build gem native extension.

/usr/local/rvm/rubies/ruby-1.**9.2-p180/bin/ruby extconf.rb
checking for main() in -lc... yes
creating Makefile

make
gcc -I. -I/usr/local/rvm/rubies/ruby-**1.9.2-p180/include/ruby-1.9.1/**i686-linux
-I/usr/local/rvm/rubies/ruby-**1.9.2-p180/include/ruby-1.9.1/**ruby/backward
-I/usr/local/rvm/rubies/ruby-**1.9.2-p180/include/ruby-1.9.1 -I.
-D_FILE_OFFSET_BITS=64 -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter
-Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-**initializers
-Wno-long-long -fPIC -o http11_parser.o -c http11_parser.c
http11_parser.rl: In function ‘http_parser_execute’:
http11_parser.rl:105: warning: comparison between signed and unsigned
integer expressions
gcc -I. -I/usr/local/rvm/rubies/ruby-**1.9.2-p180/include/ruby-1.9.1/**i686-linux
-I/usr/local/rvm/rubies/ruby-**1.9.2-p180/include/ruby-1.9.1/**ruby/backward
-I/usr/local/rvm/rubies/ruby-**1.9.2-p180/include/ruby-1.9.1 -I.
-D_FILE_OFFSET_BITS=64 -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter
-Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-**initializers
-Wno-long-long -fPIC -o http11.o -c http11.c
http11.c: In function ‘http_field’:
http11.c:70: warning: format not a string literal and no format arguments
http11.c:71: warning: format not a string literal and no format arguments
http11.c:77: error: ‘struct RString’ has no member named ‘ptr’
http11.c:77: error: ‘struct RString’ has no member named ‘len’
http11.c: In function ‘request_uri’:
http11.c:102: warning: format not a string literal and no format arguments
http11.c: In function ‘fragment’:
http11.c:113: warning: format not a string literal and no format arguments
http11.c: In function ‘request_path’:
http11.c:124: warning: format not a string literal and no format arguments
http11.c: In function ‘query_string’:
http11.c:135: warning: format not a string literal and no format arguments
http11.c: In function ‘header_done’:
http11.c:172: error: ‘struct RString’ has no member named ‘ptr’
http11.c:172: error: ‘struct RString’ has no member named ‘ptr’
http11.c:172: error: ‘struct RString’ has no member named ‘ptr’
http11.c:174: error: ‘struct RString’ has no member named ‘ptr’
http11.c:176: error: ‘struct RString’ has no member named ‘ptr’
http11.c:177: error: ‘struct RString’ has no member named ‘len’
http11.c: In function ‘HttpParser_execute’:
http11.c:298: error: ‘struct RString’ has no member named ‘ptr’
http11.c:299: error: ‘struct RString’ has no member named ‘len’
http11.c:307: warning: format not a string literal and no format arguments
make: *** [http11.o] Error 1

Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.**2-p180/gems/mongrel-1.1.5
for inspection.
Results logged to /usr/local/rvm/gems/ruby-1.9.**
2-p180/gems/mongrel-1.1.5/ext/**http11/gem_make.out

I know the answer is probably somewhere in the above output, but I just
can't see it. I need to get this installed pretty fast, as having an issue
with webrick not handling file uploading when running in daemon mode. I want
to test Mongrel to see if solves my problem before I go messing around with
complex unicorn proxy apache setups etc.

Any help would be very very great!

Thanks in advance,
Jen!

Unless Apache mod_proxy added full request/response buffering, unicorn
and Apache mod_proxy don't mix. nginx is still the only supported proxy
for unicorn (speaking as the project leader for unicorn).

Alternatively, if you're already running Mongrel without a proxy in
front, Rainbows! standalone with ThreadSpawn[1] is kinda like Mongrel
except far less portable (and unheard of in production use):

Here's a sample config file to get you started:
---------------------- rainbows.conf.rb ----------------------
Rainbows! do
  use :ThreadSpawn

  # the Rainbows! default is far lower than Mongrel's default of 950,
  # but it's easier to manage/balance worker processes with Rainbows!
  worker_connections 50

  # Rainbows! limits uploads to 1M by default, change with this
  client_max_body_size 666
end

# 2-4 per CPU is a good number depending on the app/RAM
worker_processes 1

···

Jen <jen.bottom@gmail.com> wrote:

I want to test Mongrel to see if solves my
problem before I go messing around with complex unicorn proxy apache
setups etc.

---------------------------------------------------------------

[1] - http://rainbows.rubyforge.org/Rainbows/ThreadSpawn.html
--
Eric Wong

Try "gem install mongrel --pre", too. That should get you the
1.2.0 prerelease that Luis started working on last year but
appears to have abandoned.

···

Jen <jen.bottom@gmail.com> wrote:

When running 'gem install mongrel' I am getting the following error: