Problems installing mongrel in Ruby 1.9.1 on Mac OS

View: New views
7 Messages — Rating Filter:   Alert me  

Problems installing mongrel in Ruby 1.9.1 on Mac OS

by Guillermo Acilu :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Problems installing mongrel in Ruby 1.9.1 on Mac OS Hello guys,

When I run “gem install mongrel”, I get the following error:

Building native extensions.  This could take a while...
ERROR:  Error installing mongrel:
    ERROR: Failed to build gem native extension.

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

make
gcc -I. -I/usr/local/include/ruby-1.9.1/i386-darwin9.7.0 -I/usr/local/include/ruby-1.9.1/ruby/backward -I/usr/local/include/ruby-1.9.1 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common -D_XOPEN_SOURCE=1 -O2 -g -Wall -Wno-parentheses  -fno-common -pipe -fno-common  -o http11.o -c http11.c
http11.c: In function ‘http_field’:
http11.c:77: error: ‘struct RString’ has no member named ‘ptr’
http11.c:77: error: ‘struct RString’ has no member named ‘len’
http11.c:77: warning: left-hand operand of comma expression has no effect
http11.c:77: warning: statement with no effect
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’
make: *** [http11.o] Error 1

Any ideas why?

The rest of the gems install ok.

I am using Ruby 1.9.1 on Mac OS 10.5.7.

Thanks,

GA

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---


RE: Problems installing mongrel in Ruby 1.9.1 on Mac OS

by Pardee, Roy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Problems installing mongrel in Ruby 1.9.1 on Mac OS
There may be something of use to you on this page:
 
 
HTH,
 
-Roy


From: rubyonrails-talk@... [mailto:rubyonrails-talk@...] On Behalf Of Guillermo Acilu
Sent: Thursday, July 09, 2009 5:55 AM
To: Ruby on Rails List
Subject: [Rails] Problems installing mongrel in Ruby 1.9.1 on Mac OS

Hello guys,

When I run “gem install mongrel”, I get the following error:

Building native extensions.  This could take a while...
ERROR:  Error installing mongrel:
    ERROR: Failed to build gem native extension.

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

make
gcc -I. -I/usr/local/include/ruby-1.9.1/i386-darwin9.7.0 -I/usr/local/include/ruby-1.9.1/ruby/backward -I/usr/local/include/ruby-1.9.1 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common -D_XOPEN_SOURCE=1 -O2 -g -Wall -Wno-parentheses  -fno-common -pipe -fno-common  -o http11.o -c http11.c
http11.c: In function ‘http_field’:
http11.c:77: error: ‘struct RString’ has no member named ‘ptr’
http11.c:77: error: ‘struct RString’ has no member named ‘len’
http11.c:77: warning: left-hand operand of comma expression has no effect
http11.c:77: warning: statement with no effect
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’
make: *** [http11.o] Error 1

Any ideas why?

The rest of the gems install ok.

I am using Ruby 1.9.1 on Mac OS 10.5.7.

Thanks,

GA




GHC Confidentiality Statement

This message and any attached files might contain confidential information protected by federal and state law. The information is intended only for the use of the individual(s) or entities originally named as addressees. The improper disclosure of such information may be subject to civil or criminal penalties. If this message reached you in error, please contact the sender and destroy this message. Disclosing, copying, forwarding, or distributing the information by unauthorized individuals or entities is strictly prohibited by law.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Problems installing mongrel in Ruby 1.9.1 on Mac OS

by Conrad Taylor :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Jul 9, 2009 at 5:55 AM, Guillermo Acilu <x2rails@...> wrote:
Hello guys,

When I run “gem install mongrel”, I get the following error:

Building native extensions.  This could take a while...
ERROR:  Error installing mongrel:
    ERROR: Failed to build gem native extension.

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

make
gcc -I. -I/usr/local/include/ruby-1.9.1/i386-darwin9.7.0 -I/usr/local/include/ruby-1.9.1/ruby/backward -I/usr/local/include/ruby-1.9.1 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common -D_XOPEN_SOURCE=1 -O2 -g -Wall -Wno-parentheses  -fno-common -pipe -fno-common  -o http11.o -c http11.c
http11.c: In function ‘http_field’:
http11.c:77: error: ‘struct RString’ has no member named ‘ptr’
http11.c:77: error: ‘struct RString’ has no member named ‘len’
http11.c:77: warning: left-hand operand of comma expression has no effect
http11.c:77: warning: statement with no effect
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’
make: *** [http11.o] Error 1

Any ideas why?

The rest of the gems install ok.

I am using Ruby 1.9.1 on Mac OS 10.5.7.

Thanks,

GA

Hi, you might want to try installing Thin and use it in place of Mongrel:

sudo gem install thin

Good luck,

-Conrad


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Problems installing mongrel in Ruby 1.9.1 on Mac OS

by Ami-9 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi
check the instructions on my blog
rubynyc.wordpress.com it has many other gems fixes for 1.9.1

you can install thin server, but you won't be able to see the log like
in mongrel
you will lose the debugger, since its not compatible with 1.9 yet

Ami Mahloof

On Jul 9, 8:55 am, Guillermo Acilu <x2ra...@...> wrote:

> Hello guys,
>
> When I run ³gem install mongrel², I get the following error:
>
> Building native extensions.  This could take a while...
> ERROR:  Error installing mongrel:
>     ERROR: Failed to build gem native extension.
>
> /usr/local/bin/ruby extconf.rb
> checking for main() in -lc... yes
> creating Makefile
>
> make
> gcc -I. -I/usr/local/include/ruby-1.9.1/i386-darwin9.7.0
> -I/usr/local/include/ruby-1.9.1/ruby/backward
> -I/usr/local/include/ruby-1.9.1 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE
> -fno-common -D_XOPEN_SOURCE=1 -O2 -g -Wall -Wno-parentheses  -fno-common
> -pipe -fno-common  -o http11.o -c http11.c
> http11.c: In function Œhttp_field¹:
> http11.c:77: error: Œstruct RString¹ has no member named Œptr¹
> http11.c:77: error: Œstruct RString¹ has no member named Œlen¹
> http11.c:77: warning: left-hand operand of comma expression has no effect
> http11.c:77: warning: statement with no effect
> 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¹
> make: *** [http11.o] Error 1
>
> Any ideas why?
>
> The rest of the gems install ok.
>
> I am using Ruby 1.9.1 on Mac OS 10.5.7.
>
> Thanks,
>
> GA
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Problems installing mongrel in Ruby 1.9.1 on Mac OS

by Adam Akhtar-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


To fix this:

1) cd /usr/local/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5/ext/http11
2) sudo vi / mate on http11.c and:
replace line 77 with
for(ch = RSTRING_PTR(f), end = ch + RSTRING_LEN(f); ch < end; ch++) {
replace line 172 with
colon = strchr(RSTRING_PTR(temp), ':');
replace line 174 with
rb_hash_aset(req, global_server_name, rb_str_substr(temp, 0, colon -
RSTRING_PTR(temp)));
replce line 176,177
rb_str_substr(temp, colon - RSTRING_PTR(temp)+1,
RSTRING_LEN(temp)));
replace lines 298 299
dptr = RSTRING_PTR(data);
dlen = RSTRING_LEN(data);
3) save the file, close the vi / textmate
4) sudo ruby extconf.rb && sudo make && sudo make install
5) cd ../../lib/mongrel
(or the full path
"/usr/local/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5/lib/mongrel"
6) mate / sudo vi handlers.rb
7) fix the case statements in
On lines 208-212, change instances of ": false" to "then false"
--
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Problems installing mongrel in Ruby 1.9.1 on Mac OS

by Adam Akhtar-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


As a note, this works on all OS versions (windows/linux/mac).

Just browse to those listings (the notes above are for linux but you can
translate them easy enough.  Just find the files and change the lines as
noted above, and it will work for you.

I've accomplished this on Windows Vista, Linux CentOS 5, Linux Ubuntu
Hardy, and my friend has it working on the latest MAC OS.
--
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Problems installing mongrel in Ruby 1.9.1 on Mac OS

by Adam Akhtar-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I tried this and it seems to have worked for me.  Thank god to whoever
posted this!

Cris

Alpha Blue wrote:

> To fix this:
>
> 1) cd /usr/local/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5/ext/http11
> 2) sudo vi / mate on http11.c and:
> replace line 77 with
> for(ch = RSTRING_PTR(f), end = ch + RSTRING_LEN(f); ch < end; ch++) {
> replace line 172 with
> colon = strchr(RSTRING_PTR(temp), ':');
> replace line 174 with
> rb_hash_aset(req, global_server_name, rb_str_substr(temp, 0, colon -
> RSTRING_PTR(temp)));
> replce line 176,177
> rb_str_substr(temp, colon - RSTRING_PTR(temp)+1,
> RSTRING_LEN(temp)));
> replace lines 298 299
> dptr = RSTRING_PTR(data);
> dlen = RSTRING_LEN(data);
> 3) save the file, close the vi / textmate
> 4) sudo ruby extconf.rb && sudo make && sudo make install
> 5) cd ../../lib/mongrel
> (or the full path
> "/usr/local/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5/lib/mongrel"
> 6) mate / sudo vi handlers.rb
> 7) fix the case statements in
> On lines 208-212, change instances of ": false" to "then false"

--
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---