在Windows上安装'elance'gem时,找不到libcurl或curl / curl.h

时间:2014-03-19 08:00:11

标签: ruby-on-rails ruby curl

我在窗户上遇到卷曲和遏制问题。

致力于以下环境: 红宝石1.9.3 rails 4.0.3

并添加了#elance'宝石与gemfile但添加此宝石后出现以下错误。我需要一个窗口环境的解决方案。

错误详情:

Gem::Installer::ExtensionBuildError: 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:
    --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=c:/Ruby193/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
extconf.rb:23:in `<main>':   Can't find libcurl or curl/curl.h (RuntimeError)


An error occurred while installing curb (0.8.5), and Bundler cannot continue.
Make sure that `gem install curb -v '0.8.5'` succeeds before bundling.

我遇到了这个错误。能不能请任何人解决并帮助我解决Windows。

1 个答案:

答案 0 :(得分:0)

cURL download page - Win32 section上下载并安装适用于Windows的 cURL 。 ZIP文件包含您可以运行的curl.exe,它是您需要的必需依赖项。