有一个 Windows 主机和一个使用 VirtualBox 的 Ubuntu 客户机。
我们可以在 Ubuntu 上为单个 gem 安装 gem。运行时
bundle install --path vendor
对于 Ubuntu 中共享文件夹中的应用程序,它会失败。
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-2.1.1/bin/ruby extconf.rb
/var/www/chef-playground/vendor/ruby/2.1.0/gems/mini_portile-0.5.2/lib/mini_portile.rb:226: warning: Insecure world writable dir /opt/chef/embedded/bin in PATH, mode 040777
Extracting libxml2-2.8.0.tar.gz into tmp/x86_64-linux-gnu/ports/libxml2/2.8.0... OK
Running 'configure' for libxml2 2.8.0... OK
Running 'compile' for libxml2 2.8.0... OK
Running 'install' for libxml2 2.8.0... OK
Activating libxml2 2.8.0 (from /var/www/chef-playground/vendor/ruby/2.1.0/gems/nokogiri-1.6.1/ports/x86_64-linux-gnu/libxml2/2.8.0)...
Extracting libxslt-1.1.26.tar.gz into tmp/x86_64-linux-gnu/ports/libxslt/1.1.26... OK
Running 'configure' for libxslt 1.1.26... OK
Running 'compile' for libxslt 1.1.26... OK
Running 'install' for libxslt 1.1.26... OK
Activating libxslt 1.1.26 (from /var/www/chef-playground/vendor/ruby/2.1.0/gems/nokogiri-1.6.1/ports/x86_64-linux-gnu/libxslt/1.1.26)...
checking for libxml/parser.h... yes
checking for libxslt/xslt.h... yes
checking for libexslt/exslt.h... yes
checking for iconv_open() in iconv.h... yes
checking for xmlParseDoc() in -lxml2... yes
checking for xsltParseStylesheetDoc() in -lxslt... yes
checking for exsltFuncRegister() in -lexslt... yes
checking for xmlHasFeature()... yes
checking for xmlFirstElementChild()... yes
checking for xmlRelaxNGSetParserStructuredErrors()... yes
checking for xmlRelaxNGSetParserStructuredErrors()... yes
checking for xmlRelaxNGSetValidStructuredErrors()... yes
checking for xmlSchemaSetValidStructuredErrors()... yes
checking for xmlSchemaSetParserStructuredErrors()... yes
creating Makefile
Text file busy @ unlink_internal - ./siteconf20140313-27134-167s4eq.rb
Gem files will remain installed in /var/www/chef-playground/vendor/ruby/2.1.0/gems/nokogiri-1.6.1 for inspection.
Results logged to /var/www/chef-playground/vendor/ruby/2.1.0/extensions/x86_64-linux/2.1.0/nokogiri-1.6.1/gem_make.out
An error occurred while installing nokogiri (1.6.1), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.1'` succeeds before bundling
最佳答案
堆栈跟踪的最后一行有解释。
An error occurred while installing nokogiri (1.6.1), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.1'` succeeds before bundling
我在 Fedora 20 上使用它时遇到了同样的错误。nokogiri 中有关于如何克服它的很好的解释。网站。
我运行了以下 2 个命令,然后 bundle install
开始工作:
sudo yum install -y rubygem-nokogiri
sudo yum install -y gcc ruby-devel libxml2 libxml2-devel libxslt libxslt-devel
关于bundle - Gem 在共享 VirtualBox 文件夹上安装失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22381369/