David Dongjihn Suh David Dongjihn Suh - 1 year ago 152
Ruby Question

how do i get curb to install on windows?

C:\sites\loltilt2>gem install curb -v '0.8.5'
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing curb:
ERROR: Failed to build gem native extension.

C:/Ruby193/bin/ruby.exe extconf.rb
checking for curl-config... no
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:
extconf.rb:23:in `<main>': Can't find libcurl or curl/curl.h (RuntimeError)

Try passing --with-curl-dir or --with-curl-lib and --with-curl-include
options to extconf.

Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/curb-0.8.
5 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/curb-0.8.5/ext/gem_make.ou

how do i fix this curb issue? I've been trying for hours, but the gem won't install.
i have tried installing a different version of curb... still doesn't install. I have also tried placing the 2 .dll files into my windows folder... still doesn't install. What should I do?

Answer Source


Installing a gem which doesn't have "native extensions" is more about the gem & its dependencies, and less about Windows.

You mention you've "put the .dll files in the Windows folder" - this won't solve the problem, as it still doesn't give the gem that which it needs -- library / "header" files. Like the mysql2 or imagemagick gems, you need to have a version of the "software" installed on your system, which the gem will then be able to reference upon installation

Although I have installed the curb gem on Windows 7 before, a recent system upgrade removed it (thus leaving me without any first-hand references for you). However, I can tell you it is possible if you use a tutorial like this



The bottom line is you need to install & reference the libCURL library on your PC before attempting to install the gem. This is the trickiest part - you need to find the version of libCURL which has all the correct files, etc for you

You need the MingW32 Binary version of libCURL (curl-7.xx.0-devel-mingw32)

When you download & unzip the binary file, you should have the /include and /bin directories with the library (that's how you know if you have the right version):

enter image description here

Once you have this, unzip it to a folder on your system:

enter image description here



This will give you the ability to reference the library files it contains when installing your gem:

gem install curb --version 0.7.18 --platform=ruby -- -- --with-curl-lib="C:/path/to/your/curl-7.xx.0-devel-mingw32/bin" --with-curl-include="C:/path/to/your/curl-7.xx.0-devel-mingw32/include"
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download