如何安装ruby-on-rails依赖的nokogiri gem以处理XML和HTML?
- 内容介绍
- 文章标签
- 相关推荐
本文共计658个文字,预计阅读时间需要3分钟。
我在搜索时发现,很多人在尝试安装nokogiri时遇到了各种问题,但似乎没有找到关于特定文件被跳过的详细资料。想了解如何解决这个问题吗?尝试以下步骤:
1. 使用 `gem install nokogiri` 安装 nokogiri。
2.如果遇到Building native extensions的问题,这可能是因为缺少必要的编译工具。
3.确保已安装 Ruby 开发包(如 `ruby-dev`)和编译器(如 GCC)。
4.尝试使用 `bundle exec gem install nokogiri` 来解决依赖问题。
如果以上步骤仍然无法解决问题,请提供更多错误信息以便进一步分析。
gem install nokogiri Building native extensions. This could take a while... Successfully installed nokogiri-1.6.0 unable to convert "\xE4" from ASCII-8BIT to UTF-8 for ext/nokogiri/tmp/i686-apple-darwin11/ports/libxml2/2.8.0/libxml2-2.8.0/doc/examples/testWriter.c, skipping unable to convert "\xF8" from ASCII-8BIT to UTF-8 for ext/nokogiri/tmp/i686-apple-darwin11/ports/libxml2/2.8.0/libxml2-2.8.0/entities.c, skipping unable to convert "\xE9" from ASCII-8BIT to UTF-8 for ext/nokogiri/tmp/i686-apple-darwin11/ports/libxml2/2.8.0/libxml2-2.8.0/runtest.c, skipping unable to convert "\xC0" from ASCII-8BIT to UTF-8 for ext/nokogiri/tmp/i686-apple-darwin11/ports/libxml2/2.8.0/libxml2-2.8.0/test/XInclude/ents/isolatin.txt, skipping unable to convert "\xF8" from ASCII-8BIT to UTF-8 for ext/nokogiri/tmp/i686-apple-darwin11/ports/libxml2/2.8.0/libxml2-2.8.0/testapi.c, skipping unable to convert "\xF6" from ASCII-8BIT to UTF-8 for ext/nokogiri/tmp/i686-apple-darwin11/ports/libxslt/1.1.26/libxslt-1.1.26/ChangeLog, skipping unable to convert "\xF6" from ASCII-8BIT to UTF-8 for ext/nokogiri/tmp/i686-apple-darwin11/ports/libxslt/1.1.26/libxslt-1.1.26/libxslt/xslt.c, skipping unable to convert "\xE1" from ASCII-8BIT to UTF-8 for ext/nokogiri/tmp/i686-apple-darwin11/ports/libxslt/1.1.26/libxslt-1.1.26/NEWS, skipping unable to convert "\x89" from ASCII-8BIT to UTF-8 for ext/nokogiri/tmp/i686-apple-darwin11/ports/libxslt/1.1.26/libxslt-1.1.26/tests/xmlspec/logo-REC, skipping unable to convert "\xFD" from ASCII-8BIT to UTF-8 for ext/nokogiri/tmp/i686-apple-darwin11/ports/libxslt/1.1.26/libxslt-1.1.26/win32/Readme.txt, skipping unable to convert "\xCF" from ASCII-8BIT to UTF-8 for ports/i686-apple-darwin11/libxml2/2.8.0/bin/xmlcatalog, skipping unable to convert "\xCF" from ASCII-8BIT to UTF-8 for ports/i686-apple-darwin11/libxml2/2.8.0/bin/xmllint, skipping unable to convert "\xCF" from ASCII-8BIT to UTF-8 for ports/i686-apple-darwin11/libxslt/1.1.26/bin/xsltproc, skipping 1 gem installed 大多数错误是测试或示例代码,并且所有错误都与编码有关,当它尝试将字符转换为UTF-8时如果发现错误它跳过它,但不是很重要,nokogiri将在那些之后工作警告
本文共计658个文字,预计阅读时间需要3分钟。
我在搜索时发现,很多人在尝试安装nokogiri时遇到了各种问题,但似乎没有找到关于特定文件被跳过的详细资料。想了解如何解决这个问题吗?尝试以下步骤:
1. 使用 `gem install nokogiri` 安装 nokogiri。
2.如果遇到Building native extensions的问题,这可能是因为缺少必要的编译工具。
3.确保已安装 Ruby 开发包(如 `ruby-dev`)和编译器(如 GCC)。
4.尝试使用 `bundle exec gem install nokogiri` 来解决依赖问题。
如果以上步骤仍然无法解决问题,请提供更多错误信息以便进一步分析。
gem install nokogiri Building native extensions. This could take a while... Successfully installed nokogiri-1.6.0 unable to convert "\xE4" from ASCII-8BIT to UTF-8 for ext/nokogiri/tmp/i686-apple-darwin11/ports/libxml2/2.8.0/libxml2-2.8.0/doc/examples/testWriter.c, skipping unable to convert "\xF8" from ASCII-8BIT to UTF-8 for ext/nokogiri/tmp/i686-apple-darwin11/ports/libxml2/2.8.0/libxml2-2.8.0/entities.c, skipping unable to convert "\xE9" from ASCII-8BIT to UTF-8 for ext/nokogiri/tmp/i686-apple-darwin11/ports/libxml2/2.8.0/libxml2-2.8.0/runtest.c, skipping unable to convert "\xC0" from ASCII-8BIT to UTF-8 for ext/nokogiri/tmp/i686-apple-darwin11/ports/libxml2/2.8.0/libxml2-2.8.0/test/XInclude/ents/isolatin.txt, skipping unable to convert "\xF8" from ASCII-8BIT to UTF-8 for ext/nokogiri/tmp/i686-apple-darwin11/ports/libxml2/2.8.0/libxml2-2.8.0/testapi.c, skipping unable to convert "\xF6" from ASCII-8BIT to UTF-8 for ext/nokogiri/tmp/i686-apple-darwin11/ports/libxslt/1.1.26/libxslt-1.1.26/ChangeLog, skipping unable to convert "\xF6" from ASCII-8BIT to UTF-8 for ext/nokogiri/tmp/i686-apple-darwin11/ports/libxslt/1.1.26/libxslt-1.1.26/libxslt/xslt.c, skipping unable to convert "\xE1" from ASCII-8BIT to UTF-8 for ext/nokogiri/tmp/i686-apple-darwin11/ports/libxslt/1.1.26/libxslt-1.1.26/NEWS, skipping unable to convert "\x89" from ASCII-8BIT to UTF-8 for ext/nokogiri/tmp/i686-apple-darwin11/ports/libxslt/1.1.26/libxslt-1.1.26/tests/xmlspec/logo-REC, skipping unable to convert "\xFD" from ASCII-8BIT to UTF-8 for ext/nokogiri/tmp/i686-apple-darwin11/ports/libxslt/1.1.26/libxslt-1.1.26/win32/Readme.txt, skipping unable to convert "\xCF" from ASCII-8BIT to UTF-8 for ports/i686-apple-darwin11/libxml2/2.8.0/bin/xmlcatalog, skipping unable to convert "\xCF" from ASCII-8BIT to UTF-8 for ports/i686-apple-darwin11/libxml2/2.8.0/bin/xmllint, skipping unable to convert "\xCF" from ASCII-8BIT to UTF-8 for ports/i686-apple-darwin11/libxslt/1.1.26/bin/xsltproc, skipping 1 gem installed 大多数错误是测试或示例代码,并且所有错误都与编码有关,当它尝试将字符转换为UTF-8时如果发现错误它跳过它,但不是很重要,nokogiri将在那些之后工作警告

