Windows 上的 Ruby 限制:我安装了 0.7.12,捆绑程序抱怨无法安装 0.7.10
调用“bundle update”时出现此错误:
使用本机安装路边 (0.7.10) 扩展 C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:529:in `build_extensions 中的块中的救援': 错误:无法构建本地 gem 扩大。 (Gem::Installer::ExtensionBuildError)
C:/Ruby192/bin/ruby.exe extconf.rb 检查
curl-config...不检查 main() 在 -lcur... 没有 * extconf.rb 失败 * 由于某种原因无法创建 Makefile, 可能缺少必要的库 和/或标题。检查 mkmf.log 文件以获取更多详细信息。您可能需要 配置选项。
提供的配置选项: --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:/Ruby192/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 `': 不能 找到 libcurl 或curl/curl.h (运行时错误)
尝试传递 --with-curl-dir 或 --with-curl-lib 和 --with-curl-include extconf 选项。
然后 我自己使用 DevKit 安装了最新的遏制版本(0.7.12),我可以在“gem list”上看到它。然而,即使我没有在 Gemfile 中的任何地方提到“curb”,捆绑器在尝试安装 0.7.10(旧版本)时仍然会抛出相同的错误。
问题出在哪里以及如何解决?
Windows 7、Ruby 1.92、Rails 3
I got this error when calling "bundle update":
Installing curb (0.7.10) with native
extensions
C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:529:in
`rescue in block in build_extensions':
ERROR: Failed to build gem native
extension.
(Gem::Installer::ExtensionBuildError)C:/Ruby192/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:/Ruby192/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 `': 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.
Then installed the latest curb version (0.7.12) by myself using DevKit and I can see it on "gem list". However, the bundler still throws the same error trying to install curb 0.7.10 (older version), even though I haven't mentioned "curb" anywhere in my Gemfile.
Where is the problem and how do I solve it?
Windows 7, Ruby 1.92, Rails 3
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
找到了解决方案。只是“捆绑更新遏制”。
Found the solution. Just "bundle update curb".