ruby-on-rails-4 - 无法在 windows7 中安装 curb gem

标签 ruby-on-rails-4 curb

curb gem 安装失败。 我正在使用以下配置:-

  • Windows 7

  • ruby 2

  • 轨道 4

  • gem“ bundler 1.3.5”

C:\RorProjects>gem install curb

构建 native 扩展。这可能需要一段时间... 错误:安装路缘时出错: 错误:无法构建 gem native 扩展。

    C:\Users\abc>gem install curb
    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:/Rubyinstaller200/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:/Rubyinstaller200/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}/
        --with-curllib
        --without-curllib
extconf.rb:18: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:/Rubyinstaller200/lib/ruby/gems/2.0.0/gems/
curb-0.8.4 for inspection.
Results logged to C:/Rubyinstaller200/lib/ruby/gems/2.0.0/gems/curb-0.8.4/ext/ge
m_make.out

最佳答案

尝试安装 mingw 并在其中运行命令,我已经有一段时间没有在 Windows 上工作了,但它曾经用来解决我的 gem 安装问题:

http://www.mingw.org/

关于ruby-on-rails-4 - 无法在 windows7 中安装 curb gem,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18100800/

相关文章:

html - 如何将额外数据添加到 simple_form 自定义包装器 :icon

ruby-on-rails - ActiveRecord::QueryMethod 'includes' 忽略了我的选择方法。我该如何处理?

ruby-on-rails - 模型名称出现在我的 Rails 验证错误中

ruby - Curb curb-fu gem 安装问题

ruby-on-rails - 模拟 Curl::Easy.perform? (在路边)

ruby-on-rails - 在 Rails Controller 中跳过多个过滤器

JavaScript 未在 Ruby on Rails 中运行

ruby - 遏制 epsv 问题

ruby - 使用 ruby​​ curb gem 访问 paypal api