[英]capybara couldn't be installed due to nokogiri gem
i attached capybara to my Gemfile. 我将水豚附在我的Gemfile上。 when i bundle install, i always get this message
当我捆绑安装时,我总是会收到此消息
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/nokogiri-1.6.3.1 for inspection.
宝石文件将保留安装在/Library/Ruby/Gems/2.0.0/gems/nokogiri-1.6.3.1中进行检查。 Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/nokogiri-1.6.3.1/gem_make.out An error occurred while installing nokogiri (1.6.3.1), and Bundler cannot continue.
结果记录到/Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/nokogiri-1.6.3.1/gem_make.out安装nokogiri(1.6.3.1)时发生错误,Bundler无法继续。 Make sure that
gem install nokogiri -v '1.6.3.1'
succeeds before bundling.捆绑之前,请确保
gem install nokogiri -v '1.6.3.1'
成功。
i realized that the problem with nokogiri gem, but i googled all the available methods to install it and that giving me the same output. 我意识到nokogiri gem的问题,但我用Google搜索了所有可用的安装方法,并给了我相同的输出。
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/nokogiri-1.6.3.1 for inspection.
宝石文件将保留安装在/Library/Ruby/Gems/2.0.0/gems/nokogiri-1.6.3.1中进行检查。 Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/nokogiri-1.6.3.1/gem_make.out.
结果记录到/Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/nokogiri-1.6.3.1/gem_make.out。
i wanna get the point of that error because a similar ones occurs frequently. 我想知道该错误的原因,因为类似错误经常发生。
Solved, you need to reinstall libiconv even if it's already installed because it may be missed or corrupted . 解决了,即使libiconv已经安装,也需要重新安装,因为它可能会丢失或损坏 。 then you can install nokogiri.
然后您可以安装nokogiri。
brew tap homebrew/dupes.
酿造自来水/重复。
brew install libiconv.
brew安装libiconv。
brew link libiconv --force.
brew链接libiconv --force。
gem install nokogiri -v 1.6.3.1 -- --with-iconv-dir=/usr/local.
gem install nokogiri -v 1.6.3.1---with-iconv-dir = / usr / local
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.