我正在尝试安装feedzirra,但遇到了问题。
当我安装Feedzirra时,它会查找curb (0.7.18)
我按照说明在Windows上安装路缘

>gem install curb -- --with-curl-lib=C:/curl-7.27.0-devel-mingw
32/bin --with-curl-include=C:/curl-7.27.0-devel-mingw32/include
Fetching: curb-0.8.4.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions with: '--with-curl-lib=C:/curl-7.27.0-devel-mingw32/b
in --with-curl-include=C:/curl-7.27.0-devel-mingw32/include'
This could take a while...
Successfully installed curb-0.8.4
Installing ri documentation for curb-0.8.4
1 gem installed

我试图卸载并重新安装feedzirra,但收到以下消息时没有帮助
Installing curb (0.7.18)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension
.

    C:/RailsInstaller/Ruby1.9.3/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:/RailsInstaller/Ruby1.9.3/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)

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


Gem files will remain installed in C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9
.1/gems/curb-0.7.18 for inspection.
Results logged to C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/curb-0.7.
18/ext/gem_make.out
An error occurred while installing curb (0.7.18), and Bundler cannot continue.
Make sure that `gem install curb -v '0.7.18'` succeeds before bundling.

如何强制feedzirra使用最新版本的路缘或者如何仅安装路缘石(0.7.18)版本?

最佳答案

尝试在-v 0.7.18之后添加gem install curb

>gem install curb -v 0.7.18 -- --with-curl-lib=C:/curl-7.27.0-devel-mingw32/bin --with-curl-include=C:/curl-7.27.0-devel-mingw32/include

最新的Feedzirra有一个curb ~> 0.7.15依赖项,因此curb-0.8.4不适合-这里有一个explanation引用bundler site
另外,如果您使用的是类似于RVM(如果我没记错的话,有一个类似的windows实用程序称为pik)的东西,那么请确保您正在将gems安装到应用程序使用的gemset。

07-26 03:31