Welcome Guest | Login

gem install failed for 'curb'

I need to use cURL in my rails app and so am using Curb http://curb.rubyforge.org/

However, I can't get the gem installed on Hostingrails. I followed the Freeze your Gems instructions and got this error:

[~]# mkdir .gems
[~]# gem install curb -i ~/.gems
Bulk updating Gem source index for: http://gems.rubyforge.org
Building native extensions.  This could take a while...
ERROR:  While executing gem ... (Gem::Installer::ExtensionBuildError)
   ERROR: Failed to build gem native extension.

ruby extconf.rb install curb -i /home/my_account/.gems
checking for main() in -lcurl... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
       --with-opt-dir
       --without-opt-dir
       --with-opt-include
       --without-opt-include=${opt-dir}/include
       --with-opt-lib
       --without-opt-lib=${opt-dir}/lib
       --with-make-prog
       --without-make-prog
       --srcdir=.
       --curdir
       --ruby=/usr/local/bin/ruby
       --with-curl-dir
       --without-curl-dir
       --with-curl-include
       --without-curl-include=${curl-dir}/include
       --with-curl-lib
       --without-curl-lib=${curl-dir}/lib
       --with-curllib
       --without-curllib


Gem files will remain installed in /home/my_account/.gems/gems/curb-0.1.2 for inspection.
Results logged to /home/my_account/.gems/gems/curb-0.1.2/ext/gem_make.out
I did a simple curl from the command line and it worked. Any ideas why it won't install?

2007-02-19 10:01 AM

Yeah I tried to install it on the server normally and got problems, too:
Building native extensions.  This could take a while...
ERROR:  While executing gem ... (Gem::Installer::ExtensionBuildError)
   ERROR: Failed to build gem native extension.

ruby extconf.rb install curb
checking for main() in -lcurl... yes
checking for curl/curl.h... yes
creating Makefile

make
Makefile:129: warning: overriding commands for target `/usr/local/lib/ruby/gems/1.8/gems/curb-0.1.2/lib'
Makefile:127: warning: ignoring old commands for target `/usr/local/lib/ruby/gems/1.8/gems/curb-0.1.2/lib'
gcc -I. -I. -I/usr/local/lib/ruby/1.8/i686-linux -I. -DHAVE_CURL_CURL_H  -fPIC -g -O2 -Wall  -c curb_postfield.c
gcc -I. -I. -I/usr/local/lib/ruby/1.8/i686-linux -I. -DHAVE_CURL_CURL_H  -fPIC -g -O2 -Wall  -c curb_errors.c
curb_errors.c: In function `raise_curl_easy_error_exception':
curb_errors.c:302: error: `CURLE_SEND_FAIL_REWIND' undeclared (first use in this function)
curb_errors.c:302: error: (Each undeclared identifier is reported only once
curb_errors.c:302: error: for each function it appears in.)
curb_errors.c:305: error: `CURLE_SSL_ENGINE_INITFAILED' undeclared (first use in this function)
curb_errors.c:308: error: `CURLE_LOGIN_DENIED' undeclared (first use in this function)
make: *** [curb_errors.o] Error 1
You'll need to check with whoever made Curb to see what's up. Let us know what they say.

~William

2007-02-20 01:21 AM

I've just emailed him. Will let you know what I find out.

2007-02-20 03:37 AM


Hello Guest! In order to post you must be an active client with us, please log in or sign up.