I noticed that the error seemed to be from duplicating file descriptors for 
logging.  I removed the dup calls 
on /Applications/Vagrant/embedded/lib/ruby/2.0.0/mkmf.rb lines 292 and 293 
and then I was able to install the ffi gem:

    @orgerr = $stderr
    @orgout = $stdout

... I had to fix up permissions (some steps may be a result of my blind 
stumbling through this that are not part of this recipe -- YMMV).  Then I 
installed the FFI gem:

    chown -R me:me /Applications/Vagrant/
    /Applications/Vagrant/embedded/bin/gem install ffi

I had to symlink it (and some other gems) over to the main embedded gems 
directory:

    cd /Applications/Vagrant/embedded/gems/gems/
    ln -s ../../lib/ruby/gems/2.0.0/gems/* .

On Thursday, October 16, 2014 1:07:02 PM UTC-7, Russ Tremain wrote:
>
> Hi, 
>
> I'm stuck on snow leopard for various reasons, and was successful in 
> installing vagrant 1.6.5.  However, when I attempt to install the 
> vagrant-vsphere plugin, I get the following error: 
>
>
> % vagrant plugin install vagrant-vsphere 
> ... 
>
> An error occurred while installing ffi (1.9.6), and Bundler cannot 
> continue. 
> Make sure that `gem install ffi -v '1.9.6'` succeeds before bundling. 
>
> Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem 
> native extension. 
>
>      /Applications/Vagrant/embedded/bin/ruby extconf.rb 
> /Applications/Vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:292:in 
> `initialize_copy': Bad file descriptor (Errno::EBADF) 
>         from 
> /Applications/Vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:292:in 
> `initialize_dup' 
>         from /Applications/Vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:292:in 
> `dup' 
>         from 
> /Applications/Vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:292:in 
> `<module:Logging>' 
>         from 
> /Applications/Vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:289:in 
> `<module:MakeMakefile>' 
>         from 
> /Applications/Vagrant/embedded/lib/ruby/2.0.0/mkmf.rb:47:in `<top 
> (required)>' 
>         from 
> /Applications/Vagrant/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in
>  
>
> `require' 
>         from 
> /Applications/Vagrant/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in
>  
>
> `require' 
>         from extconf.rb:4:in `<main>' 
> ... 
>
> I get the same error when I try to install vagrant-libvert. 
>
> I found a reference to this issue [1], which suggests that it is not 
> fixable due to lack of resources, and the bug was closed. 
>
> Using the mac ports install for ruby21 (ruby 2.1.3p242 (2014-09-19 
> revision 47630) [x86_64-darwin10]), I don't have any problem 
> installing native gems. 
>
> However, it appears to be difficult if not impossible to force 
> vagrant to use a non-embedded version of Ruby. 
>
> I have seen another post [2] that suggest that this is a problem with 
> binary rubies, and the suggested work-around is to use something 
> called rvm to brew up another version of ruby, i.e., 
>
>         rvm reinstall 2.1.0 --disable-binary 
>
> But again, this would be hampered by the inability to use my system 
> ruby over the embedded ruby that now ships with vagrant. 
>
> Another idea would be to build vagrant locally, and try the 
> '--disable-binary" flag, or even hack the pakage install contents to 
> substitute a different version of ruby.  How hard would that be? 
>
> Thanks for any suggestions.  I would be happy to provide a workable 
> snow-leopard install to others if I can get it to work. 
>
> -Russ 
>
> References: 
> [1] https://github.com/mitchellh/vagrant/issues/2770 
> [2] https://github.com/wayneeseguin/rvm/issues/2511#issuecomment-31536263 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to