首页 > 解决方案 > 捆绑 Nokogiri 问题

问题描述

我有一个问题,我可以通过以下方式安装 Nokogiri:

gem install nokogiri --version

但是当我运行时,bundle我收到以下错误:

ArgumentError: Unmatched double quote: "\\\\'--with-xml2-include=/usr/local/Cellar/libxml2/2.8.0/include/libxml2"
An error occurred while installing nokogiri (1.8.5), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.8.5' --source 'https://rubygems.org/'` succeeds before bundling.

在搜索有相同问题的其他人时,我无法找到类似的东西。

标签: rubybundlernokogiri

解决方案


这个问题使我查看了~/.bundler/config包含以下行的文件:

BUNDLE_BUILD__NOKOGIRI: "\\'--with-xml2-include=/usr/local/Cellar/libxml2/2.8.0/include/libxml2"

我不知道为什么那个单引号存在或它是如何出现的,但我尝试删除它并且捆绑现在工作得很好。


推荐阅读