ruby-on-rails – 安装nokogiri的gem devkit(windows)时缺少libx
发布时间:2020-12-17 01:59:35 所属栏目:百科 来源:网络整理
导读:我一直在遇到这个宝石的很多问题,所以我读到我必须使用de 1.5.0-beta. 由于我正在使用Windows,我下载了DevKit.但当我跑: gem install nokogiri –pre –withwith xml2-lib –with-xslt-lib 我明白了: Temporarily enhancing PATH to include DevKit...Buil
我一直在遇到这个宝石的很多问题,所以我读到我必须使用de 1.5.0-beta.
由于我正在使用Windows,我下载了DevKit.但当我跑: gem install nokogiri –pre –withwith xml2-lib –with-xslt-lib 我明白了: Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing nokogiri: ERROR: Failed to build gem native extension. C:/Ruby187/bin/ruby.exe extconf.rb --with-xml2-lib --with-xslt-lib --pla taform=ruby *** 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:/Ruby187/bin/ruby --with-zlib-dir --without-zlib-dir --with-zlib-include --without-zlib-include=${zlib-dir}/include --with-zlib-lib --without-zlib-lib=${zlib-dir}/lib --with-iconv-dir --without-iconv-dir --with-iconv-include --without-iconv-include=${iconv-dir}/include --with-iconv-lib --without-iconv-lib=${iconv-dir}/lib --with-xml2-dir --without-xml2-dir --with-xml2-include --without-xml2-include=${xml2-dir}/include --with-xml2-lib=${xml2-dir}/lib C:/Ruby187/lib/ruby/1.8/mkmf.rb:1177:in `dir_config': private method `split' cal led for true:TrueClass (NoMethodError) from extconf.rb:87 Gem files will remain installed in C:/Ruby187/lib/ruby/gems/1.8/gems/nokogiri-1. 5.0.beta.4 for inspection. Results logged to C:/Ruby187/lib/ruby/gems/1.8/gems/nokogiri-1.5.0.beta.4/ext/no kogiri/gem_make.out 我能做什么? 解决方法
用命令就好
gem install nokogiri --pre -- --with-xml2-lib --with-xslt-lib 看起来你正在尝试安装最新版本的nokogiri.尝试使用–version指定精确版本. 另请注意nokogiri 1.6的以下要求 >ruby1.9.3或更高 所以,如果你确实想使用ruby 1.8.7(这是EOL,顺便说一下)那么,是的,你需要指定nokogiri< 1.6.但是,如果你可以使用现代的,活的ruby,那么你可能会躲避lib依赖. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |