Cannot install Mongrel gem w ruby-1.9.2-preview3 [ x86_64 ] and Rails 3.0.0.beta4 [OS X 10.6.4]

error in make …

yves$ sudo gem install mongrel
Building native extensions. This could take a while…
ERROR: Error installing mongrel:
ERROR: Failed to build gem native extension.

/Users/yves/.rvm/rubies/ruby-1.9.2-preview3/bin/ruby extconf.rb
checking for main() in -lc… yes
creating Makefile

make
gcc -I. -I/Users/yves/.rvm/rubies/ruby-1.9.2-preview3/include/
ruby-1.9.1/x86_64-darwin10.4.0 -I/Users/yves/.rvm/rubies/ruby-1.9.2-
preview3/include/ruby-1.9.1/ruby/backward -I/Users/yves/.rvm/rubies/
ruby-1.9.2-preview3/include/ruby-1.9.1 -I. -D_XOPEN_SOURCE -
D_DARWIN_C_SOURCE -fno-common -O3 -ggdb -Wextra -Wno-unused-
parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-
missing-field-initializers -Wshorten-64-to-32 -Wno-long-long -fno-
common -pipe -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’

Looking at your error
“gcc -I.
-I/Users/yves/.rvm/rubies/ruby-1.9.2-preview3/include/ruby-1.9.1/x86_64-darwin10.4.0”

Do you see that there are 2 ruby versions there?
RVM suggests you to always install gems without “sudo” (or if you
installed
your first one with sudo, keep doing that forever).

Try to play around using:
ruby -v
sudo ruby -v

gem list
sudo gem list

And Rails dev-core said that you should not use ruby 1.9.1 with Rails
3.0beta because of seg fault errors. 1.9.2 works just great.


Fernando B.

I’m having the same issue and installed gems without user sudo.

Fernando B. wrote:

Looking at your error
“gcc -I.
-I/Users/yves/.rvm/rubies/ruby-1.9.2-preview3/include/ruby-1.9.1/x86_64-darwin10.4.0”

Do you see that there are 2 ruby versions there?
RVM suggests you to always install gems without “sudo” (or if you
installed
your first one with sudo, keep doing that forever).

Anthony G. wrote:

I’m having the same issue and installed gems without user sudo.

Fernando B. wrote:

Looking at your error
“gcc -I.
-I/Users/yves/.rvm/rubies/ruby-1.9.2-preview3/include/ruby-1.9.1/x86_64-darwin10.4.0”

Do you see that there are 2 ruby versions there?
RVM suggests you to always install gems without “sudo” (or if you
installed
your first one with sudo, keep doing that forever).

After doing some further testing with RVM installs of 1.8.7 will let you
install mongrel, whereas installs 1.9.1 and 1.9.2 won’t.

I had problem even though I had installed mongrel --pre.

In Gemfile you need to specifically point mongrel to use “1.2.0.pre2”
or else it will try to use the old version, even if you remove it from
the cache.

I had problem even though I had installed mongrel --pre.

In Gemfile you need to specifically point mongrel to use “1.2.0.pre2”
or else it will try to use the old version, even if you remove it from
the cache.

More digging and the answer is to install monrel pre-release

gem install mongrel --pre

Anthony G. wrote:

Anthony G. wrote:

I’m having the same issue and installed gems without user sudo.

Fernando B. wrote:

Looking at your error
“gcc -I.
-I/Users/yves/.rvm/rubies/ruby-1.9.2-preview3/include/ruby-1.9.1/x86_64-darwin10.4.0”

Do you see that there are 2 ruby versions there?
RVM suggests you to always install gems without “sudo” (or if you
installed
your first one with sudo, keep doing that forever).

After doing some further testing with RVM installs of 1.8.7 will let you
install mongrel, whereas installs 1.9.1 and 1.9.2 won’t.