# Cannot install Mongrel gem w ruby-1.9.2-preview3 \[ x86\_64 \] and Rails 3.0.0.beta4 \[OS X 10.6.4\]

**URL:** <https://www.ruby-forum.com/t/cannot-install-mongrel-gem-w-ruby-1-9-2-preview3-x86-64-and-rails-3-0-0-beta4-os-x-10-6-4/190337>\
**Category:** Rails\
**Created:** [June 17, 2010, 11:43pm UTC](https://www.ruby-forum.com/t/cannot-install-mongrel-gem-w-ruby-1-9-2-preview3-x86-64-and-rails-3-0-0-beta4-os-x-10-6-4/190337 "2010-06-17T23:43:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [June 17, 2010, 11:43pm UTC](https://www.ruby-forum.com/t/cannot-install-mongrel-gem-w-ruby-1-9-2-preview3-x86-64-and-rails-3-0-0-beta4-os-x-10-6-4/190337/1 "2010-06-17T23:43:27Z")

</div>

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’

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [June 18, 2010, 4:51pm UTC](https://www.ruby-forum.com/t/cannot-install-mongrel-gem-w-ruby-1-9-2-preview3-x86-64-and-rails-3-0-0-beta4-os-x-10-6-4/190337/2 "2010-06-18T16:51:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [June 20, 2010, 9:53am UTC](https://www.ruby-forum.com/t/cannot-install-mongrel-gem-w-ruby-1-9-2-preview3-x86-64-and-rails-3-0-0-beta4-os-x-10-6-4/190337/3 "2010-06-20T09:53:30Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [June 20, 2010, 11:17am UTC](https://www.ruby-forum.com/t/cannot-install-mongrel-gem-w-ruby-1-9-2-preview3-x86-64-and-rails-3-0-0-beta4-os-x-10-6-4/190337/4 "2010-06-20T11:17:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [July 1, 2010, 12:55pm UTC](https://www.ruby-forum.com/t/cannot-install-mongrel-gem-w-ruby-1-9-2-preview3-x86-64-and-rails-3-0-0-beta4-os-x-10-6-4/190337/5 "2010-07-01T12:55:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [July 1, 2010, 12:55pm UTC](https://www.ruby-forum.com/t/cannot-install-mongrel-gem-w-ruby-1-9-2-preview3-x86-64-and-rails-3-0-0-beta4-os-x-10-6-4/190337/6 "2010-07-01T12:55:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [June 20, 2010, 11:22am UTC](https://www.ruby-forum.com/t/cannot-install-mongrel-gem-w-ruby-1-9-2-preview3-x86-64-and-rails-3-0-0-beta4-os-x-10-6-4/190337/7 "2010-06-20T11:22:19Z")

</div>

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.
