Vagrant plugin and nokogiri install issue - macos

I am attempting to install the vagrant-windows plugin on Mac OSX 10.9.2. I however consistently receive the error that Bundler cannot install nokogiri 1.6.2.
Examining the gem_make.out file reveals that nokogiri cannot find libxml2, which I have installed and linked via homebrew.
Below is my gem_make.out
/Applications/Vagrant/embedded/bin/ruby extconf.rb
Building nokogiri using packaged libraries.
checking for iconv.h... yes
checking for iconv_open() in iconv.h... no
checking for iconv_open() in -liconv... yes
Building libxml2-2.8.0 for nokogiri with the following patches applied:
- 0001-Fix-parser-local-buffers-size-problems.patch
- 0002-Fix-entities-local-buffers-size-problems.patch
- 0003-Fix-an-error-in-previous-commit.patch
- 0004-Fix-potential-out-of-bound-access.patch
- 0005-Detect-excessive-entities-expansion-upon-replacement.patch
- 0006-Do-not-fetch-external-parsed-entities.patch
- 0007-Enforce-XML_PARSER_EOF-state-handling-through-the-pa.patch
- 0008-Improve-handling-of-xmlStopParser.patch
- 0009-Fix-a-couple-of-return-without-value.patch
- 0010-Keep-non-significant-blanks-node-in-HTML-parser.patch
- 0011-Do-not-fetch-external-parameter-entities.patch
************************************************************************
IMPORTANT! Nokogiri builds and uses a packaged version of libxml2.
If this is a concern for you and you want to use the system library
instead, abort this installation process and reinstall nokogiri as
follows:
gem install nokogiri -- --use-system-libraries
If you are using Bundler, tell it to use the option:
bundle config build.nokogiri --use-system-libraries
bundle install
However, note that nokogiri does not necessarily support all versions
of libxml2.
For example, libxml2-2.9.0 and higher are currently known to be broken
and thus unsupported by nokogiri, due to compatibility problems and
XPath optimization bugs.
************************************************************************
Extracting libxml2-2.8.0.tar.gz into tmp/x86_64-apple-darwin12.5.0/ports/libxml2/2.8.0... OK
Running git apply with /Users/jason/.vagrant.d/gems/gems/nokogiri-1.6.2/ports/patches/libxml2/0001-Fix-parser-local-buffers-size-problems.patch...
Running 'patch' for libxml2 2.8.0... OK
Running git apply with /Users/jason/.vagrant.d/gems/gems/nokogiri-1.6.2/ports/patches/libxml2/0002-Fix-entities-local-buffers-size-problems.patch...
Running 'patch' for libxml2 2.8.0... OK
Running git apply with /Users/jason/.vagrant.d/gems/gems/nokogiri-1.6.2/ports/patches/libxml2/0003-Fix-an-error-in-previous-commit.patch...
Running 'patch' for libxml2 2.8.0... OK
Running git apply with /Users/jason/.vagrant.d/gems/gems/nokogiri-1.6.2/ports/patches/libxml2/0004-Fix-potential-out-of-bound-access.patch...
Running 'patch' for libxml2 2.8.0... OK
Running git apply with /Users/jason/.vagrant.d/gems/gems/nokogiri-1.6.2/ports/patches/libxml2/0005-Detect-excessive-entities-expansion-upon-replacement.patch...
Running 'patch' for libxml2 2.8.0... OK
Running git apply with /Users/jason/.vagrant.d/gems/gems/nokogiri-1.6.2/ports/patches/libxml2/0006-Do-not-fetch-external-parsed-entities.patch...
Running 'patch' for libxml2 2.8.0... OK
Running git apply with /Users/jason/.vagrant.d/gems/gems/nokogiri-1.6.2/ports/patches/libxml2/0007-Enforce-XML_PARSER_EOF-state-handling-through-the-pa.patch...
Running 'patch' for libxml2 2.8.0... OK
Running git apply with /Users/jason/.vagrant.d/gems/gems/nokogiri-1.6.2/ports/patches/libxml2/0008-Improve-handling-of-xmlStopParser.patch...
Running 'patch' for libxml2 2.8.0... OK
Running git apply with /Users/jason/.vagrant.d/gems/gems/nokogiri-1.6.2/ports/patches/libxml2/0009-Fix-a-couple-of-return-without-value.patch...
Running 'patch' for libxml2 2.8.0... OK
Running git apply with /Users/jason/.vagrant.d/gems/gems/nokogiri-1.6.2/ports/patches/libxml2/0010-Keep-non-significant-blanks-node-in-HTML-parser.patch...
Running 'patch' for libxml2 2.8.0... OK
Running git apply with /Users/jason/.vagrant.d/gems/gems/nokogiri-1.6.2/ports/patches/libxml2/0011-Do-not-fetch-external-parameter-entities.patch...
Running 'patch' for 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 /Users/jason/.vagrant.d/gems/gems/nokogiri-1.6.2/ports/x86_64-apple-darwin12.5.0/libxml2/2.8.0)...
Building libxslt-1.1.28 for nokogiri with the following patches applied:
- 0001-Adding-doc-update-related-to-1.1.28.patch
- 0002-Fix-a-couple-of-places-where-f-printf-parameters-wer.patch
- 0003-Initialize-pseudo-random-number-generator-with-curre.patch
- 0004-EXSLT-function-str-replace-is-broken-as-is.patch
- 0006-Fix-str-padding-to-work-with-UTF-8-strings.patch
- 0007-Separate-function-for-predicate-matching-in-patterns.patch
- 0008-Fix-direct-pattern-matching.patch
- 0009-Fix-certain-patterns-with-predicates.patch
- 0010-Fix-handling-of-UTF-8-strings-in-EXSLT-crypto-module.patch
- 0013-Memory-leak-in-xsltCompileIdKeyPattern-error-path.patch
- 0014-Fix-for-bug-436589.patch
- 0015-Fix-mkdir-for-mingw.patch
************************************************************************
IMPORTANT! Nokogiri builds and uses a packaged version of libxslt.
If this is a concern for you and you want to use the system library
instead, abort this installation process and reinstall nokogiri as
follows:
gem install nokogiri -- --use-system-libraries
If you are using Bundler, tell it to use the option:
bundle config build.nokogiri --use-system-libraries
bundle install
************************************************************************
Extracting libxslt-1.1.28.tar.gz into tmp/x86_64-apple-darwin12.5.0/ports/libxslt/1.1.28... OK
Running git apply with /Users/jason/.vagrant.d/gems/gems/nokogiri-1.6.2/ports/patches/libxslt/0001-Adding-doc-update-related-to-1.1.28.patch...
Running 'patch' for libxslt 1.1.28... OK
Running git apply with /Users/jason/.vagrant.d/gems/gems/nokogiri-1.6.2/ports/patches/libxslt/0002-Fix-a-couple-of-places-where-f-printf-parameters-wer.patch...
Running 'patch' for libxslt 1.1.28... OK
Running git apply with /Users/jason/.vagrant.d/gems/gems/nokogiri-1.6.2/ports/patches/libxslt/0003-Initialize-pseudo-random-number-generator-with-curre.patch...
Running 'patch' for libxslt 1.1.28... OK
Running git apply with /Users/jason/.vagrant.d/gems/gems/nokogiri-1.6.2/ports/patches/libxslt/0004-EXSLT-function-str-replace-is-broken-as-is.patch...
Running 'patch' for libxslt 1.1.28... OK
Running git apply with /Users/jason/.vagrant.d/gems/gems/nokogiri-1.6.2/ports/patches/libxslt/0006-Fix-str-padding-to-work-with-UTF-8-strings.patch...
Running 'patch' for libxslt 1.1.28... OK
Running git apply with /Users/jason/.vagrant.d/gems/gems/nokogiri-1.6.2/ports/patches/libxslt/0007-Separate-function-for-predicate-matching-in-patterns.patch...
Running 'patch' for libxslt 1.1.28... OK
Running git apply with /Users/jason/.vagrant.d/gems/gems/nokogiri-1.6.2/ports/patches/libxslt/0008-Fix-direct-pattern-matching.patch...
Running 'patch' for libxslt 1.1.28... OK
Running git apply with /Users/jason/.vagrant.d/gems/gems/nokogiri-1.6.2/ports/patches/libxslt/0009-Fix-certain-patterns-with-predicates.patch...
Running 'patch' for libxslt 1.1.28... OK
Running git apply with /Users/jason/.vagrant.d/gems/gems/nokogiri-1.6.2/ports/patches/libxslt/0010-Fix-handling-of-UTF-8-strings-in-EXSLT-crypto-module.patch...
Running 'patch' for libxslt 1.1.28... OK
Running git apply with /Users/jason/.vagrant.d/gems/gems/nokogiri-1.6.2/ports/patches/libxslt/0013-Memory-leak-in-xsltCompileIdKeyPattern-error-path.patch...
Running 'patch' for libxslt 1.1.28... OK
Running git apply with /Users/jason/.vagrant.d/gems/gems/nokogiri-1.6.2/ports/patches/libxslt/0014-Fix-for-bug-436589.patch...
Running 'patch' for libxslt 1.1.28... OK
Running git apply with /Users/jason/.vagrant.d/gems/gems/nokogiri-1.6.2/ports/patches/libxslt/0015-Fix-mkdir-for-mingw.patch...
Running 'patch' for libxslt 1.1.28... OK
Running 'configure' for libxslt 1.1.28... OK
Running 'compile' for libxslt 1.1.28... OK
Running 'install' for libxslt 1.1.28... OK
Activating libxslt 1.1.28 (from /Users/jason/.vagrant.d/gems/gems/nokogiri-1.6.2/ports/x86_64-apple-darwin12.5.0/libxslt/1.1.28)...
checking for main() in -llzma... yes
checking for linker flags for static linking... NONE
checking for xmlParseDoc() in libxml/parser.h... no
checking for xmlParseDoc() in -lxml2... no
checking for xmlParseDoc() in -llibxml2... no
-----
libxml2 is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
-----
*** 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
--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=/Applications/Vagrant/embedded/bin/ruby
--help
--clean
--use-system-libraries
--enable-static
--disable-static
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
--enable-cross-build
--disable-cross-build
--with-xml2lib
--without-xml2lib
--with-libxml2lib
--without-libxml2lib

I found I needed to explicitly tell Nokogiri to use certain libraries. This wasn't obvious to me at first as Vagrant uses an embedded version of Ruby and not anything to do with what is installed via brew, or the OS itself.
NOKOGIRI_USE_SYSTEM_LIBRARIES=1 vagrant plugin install vagrant-windows
EDIT: Also just saw this exact same answer from earlier today in terms of nokogiri based plugins with Vagrant and not just vagrant-windows: https://stackoverflow.com/a/23635023/2619

Following #flurdy's suggestion, upgrading to the latest Vagrant, 1.6.5 in my case, fixed this after days of trying everything the internet has to throw at this problem.

I was having the same issue but with the vagrant-aws plugin on Mavericks...
NOKOGIRI_USE_SYSTEM_LIBRARIES=1 vagrant plugin install vagrant-aws did the trick.

Related

installing tiny_tds gives error on on mac os 10.10.5

I am using mac os and I want to connect to sql server by using ruby driver. I want to use tiny_tds but it gives error for missing free_tds but it was already installed. How can pass this?
~ brew install freetds
Warning: freetds-0.91.112 already installed
~ sudo gem install tiny_tds
Building native extensions. This could take a while...
ERROR: Error installing tiny_tds:
ERROR: Failed to build gem native extension.
complete log is follows:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20151013-22489-7z3h0n.rb extconf.rb
checking for sybfront.h... yes
checking for sybdb.h... yes
checking for tdsdbopen() in -lsybdb... no
Extracting freetds-0.91.112.tar.gz into tmp/x86_64-apple-darwin14/ports/freetds/0.91... OK
Running git apply with /Library/Ruby/Gems/2.0.0/gems/tiny_tds-0.7.0/ports/patches/freetds/0.91/Makefile.in.diff...
Running 'patch' for freetds 0.91... OK
Running git apply with /Library/Ruby/Gems/2.0.0/gems/tiny_tds-0.7.0/ports/patches/freetds/0.91/dblib-30-char-username.diff...
Running 'patch' for freetds 0.91... OK
Running 'configure' for freetds 0.91... OK
Running 'compile' for freetds 0.91... OK
Running 'install' for freetds 0.91... OK
Activating freetds 0.91 (from /Library/Ruby/Gems/2.0.0/gems/tiny_tds-0.7.0/ports/x86_64-apple-darwin14)...
checking for sybfront.h... yes
checking for sybdb.h... yes
checking for tdsdbopen() in -lsybdb... no
-----
freetds is missing.
-----
*** 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=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
--help
--enable-lookup
--disable-lookup
--with-freetds-dir
--without-freetds-dir
--with-freetds-include
--without-freetds-include=${freetds-dir}/include
--with-freetds-lib
--without-freetds-lib=${freetds-dir}/
--with-sybdblib
--without-sybdblib
--enable-system-freetds
--disable-system-freetds
--enable-system-iconv
--disable-system-iconv
--enable-system-openssl
--disable-system-openssl
--with-freetds-dir
--without-freetds-dir
--with-freetds-include
--without-freetds-include=${freetds-dir}/include
--with-freetds-lib
--without-freetds-lib=${freetds-dir}/
--with-sybdblib
--without-sybdblib
extconf failed, exit code 1
This is what fixed it for me:
brew install freetds
sudo ARCHFLAGS="-arch x86_64" gem install tiny_tds
See this answer in the GitHub issue.
gem install tiny_tds -- --disable-openssl

Libxml2 missing mac os x 10.10

Running 'compile' for libxslt 1.1.28... OK
Running 'install' for libxslt 1.1.28... OK
Activating libxslt 1.1.28 (from /Users/Kartik/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/nokogiri-1.6.4.1/ports/x86_64-apple-darwin14.0.0/libxslt/1.1.28)...
checking for main() in -llzma... yes
checking for xmlParseDoc() in libxml/parser.h... no
checking for xmlParseDoc() in -lxml2... no
checking for xmlParseDoc() in -llibxml2... no
libxml2 is missing. Please locate mkmf.log to investigate how it is failing.
*** 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.
i fiddled around with this for quite a while and the following worked for me..
1) install libxml2 with homebrew
brew install libxml2
2) install the gem via
sudo env ARCHFLAGS="-arch x86_64" gem install nokogiri:1.6.4.1 -- --use-system-libraries --with-xml=/usr/local/Cellar/libxml2/
For any who are still getting "libxml2 version 2.6.21 or later is required!" message, removing --use-system-libraries from hlv's step 2 above, worked for me.
sudo env ARCHFLAGS="-arch x86_64" gem install nokogiri:1.6.4.1 -- --with-xml=/usr/local/Cellar/libxml2/2.9.2/
I finally ended up with this version independent line:
sudo env ARCHFLAGS="-arch x86_64" gem install nokogiri -n /usr/local/bin -- --with-xml=/usr/local/Cellar/libxml2/
This worked for me (assuming Xcode is installed):
gem install nokogiri -- --with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.‌platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/libxml2 --use-system-libraries
Inspired by https://stackoverflow.com/a/28767045/1884907 (credits to lx00st)
(For MacOX 10.12.x) Perhaps you want to brew install libxml2 and also try linking into /usr/local/ first: brew link --force libxml2, then try that gem install nokogiri -- --use-system-libraries.
Using ports:
gem install nokogiri -- --use-system-libraries --with-xml=/opt/local/lib/libxml2.a
My solution, using ports:
sudo ARCHFLAGS='-arch x86_64' gem install nokogiri -- --use-system-libraries
By default, it will compile for x86_64 and i386, architecture for i386 should disabled, because the dependencies libraries in port only provide x86_64 version by default.
This is a bit of a rehash of all the other answers, but this worked for me:
gem install nokogiri -v '1.6.6.2' -- --with-iconv-dir=/usr/local/Cellar/libiconv/1.16 --with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/libxml2 --use-system-libraries

Nokogiri gem fails to install in OS X Mavericks

Install fails showing:
checking for iconv_open() in iconv.h... no
checking for iconv_open() in -liconv... no
checking for iconv_open() in -liconv... no
checking for libiconv_open() in iconv.h... no
checking for libiconv_open() in -liconv... no
checking for libiconv_open() in -liconv... no
libiconv is missing.
However, looking at nokogiri's mkmf.log, the following errors are shown:
ld: warning: ignoring file /usr/local/Cellar/libxslt/1.1.28/lib/libxslt.dylib, **file was built for x86_64 which is not the architecture being linked (i386)**: /usr/local/Cellar/libxslt/1.1.28/lib/libxslt.dylib
ld: warning: ignoring file /usr/local/Cellar/libxml2/2.9.1/lib/libxml2.dylib, **file was built for x86_64 which is not the architecture being linked (i386)**: /usr/local/Cellar/libxml2/2.9.1/lib/libxml2.dylib
ld: warning: ignoring file /usr/local/Cellar/libiconv/1.14/lib/libiconv.dylib, **file was built for x86_64 which is not the architecture being linked (i386)**: /usr/local/Cellar/libiconv/1.14/lib/libiconv.dylib
I have xcode and it's command tools installed.
My ~/.bash_profile has 64bit compiling forced by: export ARCHFLAGS="-arch x86_64"
I have libxml2, libxslt, and libiconv installed via Homebrew, and each is linked.
I've tried installing all of these without the ARCHFLAG in .bash_profile.
I've also brew install apple-gcc42 and linked, as per how tos I've found.
I've tried installing nokogiri by passing paths to libxml2, libxslt, and libiconv in /usr/local/Cellar/, but the install still fails, with same errors as above.
I've wasted at least a day on this - just trying to get one Ruby gem installed. I'd really like to get back to actually developing.
Can anyone please help?
Setting NOKOGIRI_USE_SYSTEM_LIBRARIES=1 before actually installing the gem did the trick for me.
Summarising:
If previously installed, uninstall the gem:
$ gem uninstall nokogiri
Use Homebrew to install libxml2, libxslt and libiconv if needed:
$ brew install libxml2 libxslt libiconv
Install the gem specifying the paths to the libraries to be linked against:
$ NOKOGIRI_USE_SYSTEM_LIBRARIES=1 gem install nokogiri -- --use-system-libraries --with-iconv-dir="$(brew --prefix libiconv)" --with-xml2-config="$(brew --prefix libxml2)/bin/xml2-config" --with-xslt-config="$(brew --prefix libxslt)/bin/xslt-config"
Check if HomeBrew is installed correctly with the appropriate XCode command line tools.
brew doctor
You can also check via XCode > Preferences
With valid command line tools installed, I was able to resolve the nokogiri error encountered after the OSX Maverick upgrade.
Also found that some of the 'brew' packages were outdated after the OS X Mountain Lion to Maverick upgrade. (e.g. qt, postgresql)
Here's what worked for me:
If you haven't already done so, install the XCode developer tools: $ xcode-select --install
Use homebrew to install (or reinstall) libxml2, libxslt and libiconv: $ brew install libxml2 libxslt libiconv
Install nokogiri: gem install nokogiri -- --with-iconv-dir=/usr/local/opt/libiconv
I found the solution I needed in an unmerged pull request to update the Nokogiri tutorials. I recommend that if someone else encounters this issue and has exhausted the solutions here, check that pull request list to see if someone has submitted an update to the instructions on the Nokogiri tutorials page.
From github page
First, you should:
xcode-select --install
and then re-install nokogiri.
That worked for me while another suggestion didn't. Hope this helps someone else.

Gem install Fail on Shared VirtualBox Folder

There's a Windows Host and an Ubuntu guest using VirtualBox.
We can gem install just fine for individual gems on Ubuntu. When running
bundle install --path vendor
for an app that is on a shared folder in Ubuntu it fails with.
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
The last line of your stack trace has the explanation.
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
I ran into the same error while using it on Fedora 20. There is a good explanation of how to overcome it at the nokogiri site.
I ran the following 2 commands and then the bundle install worked:
sudo yum install -y rubygem-nokogiri
sudo yum install -y gcc ruby-devel libxml2 libxml2-devel libxslt libxslt-devel
It might be because of this:
Text file busy # unlink_internal - ./siteconf20140313-27134-167s4eq.rb
This is apparently an existing problem with regards to sharedfolders, Virtualbox and Windows hosts. It seems they have been blaming Window's aggressive file handling.
https://github.com/mitchellh/vagrant/issues/2282
Ansible text file busy error
https://unix.stackexchange.com/questions/52951/gedit-wont-save-a-file-on-a-virtualbox-share-text-file-busy
You can try a workaround by installing the gems somewhere on guest machine instead of inside your sharedfolder i.e. install your gems in your home directory: bundle install --path ~/vendor. You might have to reconfigure your .bundle/config to make sure you're pointing at the correct directory.

Install problems: Nokogiri on Mac OSx Mountain Lion

For some reason I cannot install Nokogiri on my MacBook for traveling.
This is short output from gem install nokogiri:
Extracting libxml2-2.8.0.tar.gz into tmp/x86_64-apple-darwin12/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 /Users/jseidel/.rvm/gems/ruby-1.9.3-p327#rails3213/gems/nokogiri-1.6.0/ports/x86_64-apple-darwin12/libxml2/2.8.0)...
Extracting libxslt-1.1.26.tar.gz into tmp/x86_64-apple-darwin12/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 /Users/jseidel/.rvm/gems/ruby-1.9.3-p327#rails3213/gems/nokogiri-1.6.0/ports/x86_64-apple-darwin12/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... no
-----
libxml2 is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
However, I used MacPorts and it says that it's already installed:
port installed | grep lib
libxml #1.8.17_0 (active)
libxml2 #2.9.1_0 (active)
Is it getting confused because both libxml and libxml2 are installed? (Probably not.) Or is there something else going on?
I've followed the installation instructions for Nokigiri installation and that doesn't help.
Finally, I uninstalled ports libxml and libxml2 and now it fails attempting to use libiconv, having gotten past the previous XML issue it seems.
try it
sudo port upgrade outdated

Resources