1

Bundle Install Issue on Windows-7 (64-bit).

I need to install 'feedzirra' gem. For this, its dependent gem 'curb' is to be installed.

So at the time of bundle install, I got this error:-

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension"

Then I searched over internet and found that ''curl' library is essential for installing this gem.

But I checked that 'curl' is installed in my system, as when I run command "curl http://www.example.com", it shows me some result(It means 'curl' is installed in my system.). But not able to use it for installing 'curb' gem.

Then I searched and found to installed curl(curl-7.31.0-devel-mingw64) and then install "curb" gem with (--with-curl-dir) or (--with-curl-lib and --with-curl-include). But again getting the same error while running the following command:-

gem install curb --with-curl-dir="C:/curl-7.31.0-devel-mingw64"

gem install curb --with-curl-lib="curl_lib_url" and --with-curl-include="curl_include_url"

I am using following configuration:-

  • Windows 7 (64-bit)
  • Ruby 1.9.2
  • Rails 3.2.13
  • gem "bundler 1.3.5"

I don't know why I am getting error. And please do not suggest to use Ubuntu; it can be solved by using libcurl library in Ubuntu but I can't switch to Ubuntu.

halfer
  • 19,824
  • 17
  • 99
  • 186
RohitPorwal
  • 1,045
  • 15
  • 23

1 Answers1

1
  1. You're missing an extra double dash before '--with' options. The command should be gem install curb -- --with-curl-lib="curl_lib_url" --with-curl-include="curl_include_url". Note that the '--with-curl-dir' option didn't work for me as I kept getting the 'curl.h or libcurl not found' error.

  2. Ruby 1.9.x is 32bit only, so you'll have to use the 32bit package (x86) of libcurl.

  3. Finally, make sure you're using the right version of libcurl, otherwise you'll get a lot of linker errors. The one that worked for me was the one provided by Luis Lavena here.
HargrimmTheBleak
  • 2,147
  • 1
  • 19
  • 19