I'm receiving an error while trying to install a gem called typhoeus (this is used in following the book "Service Oriented Design with Rails") - I've tried a lot of things to try to get this fixed but I've hit a brick wall and am posting here in the hope someone can help.

Here is the output:

```
$ gem install typhoeus

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

/Users/my.name/.rvm/rubies/ruby-1.8.7-p302/bin/ruby extconf.rb
checking for curl/curl.h in /opt/local/include,/opt/local/include/curl,/Users/my.name/.rvm/rubies/ruby-1.8.7-p302/include/curl,/Users/my.name/.rvm/rubies/ruby-1.8.7-p302/include,/usr/include/curl,/usr/local/include/curl... yes
checking for curl_easy_init() in -lcurl... yes
creating Makefile

make
gcc -I. -I. -I/Users/my.name/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/i686-darwin10.5.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common -g -O2  -fno-common -pipe -fno-common   -g -DXP_UNIX -O3 -Wall -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline  -c native.c
In file included from /usr/local/include/curl/curl.h:35,
                 from ./native.h:5,
                 from native.c:1:
/usr/local/include/curl/curlrules.h:143: error: size of array ‘__curl_rule_01__’ is negative
make: *** [native.o] Error 1

```

I'm using rvm with ruby-1.8.7-p302 on OS X Snow Leopard with the latest XCode Tools.

From searching around I've tried to do various things, such as try installing the gem under the other ruby versions I have (ree-1.8.7-2010.02, ruby-1.9.2-head, and system ruby), to passing in architecture flags (x86\_64 or i386) for the ARCHFLAGS argument, etc.

I'm new to ruby so any help would be greatly appreciated, thanks!