vagrant-landrush / landrush

A Vagrant plugin that provides a simple DNS server for Vagrant guests
MIT License
666 stars 78 forks source link

Landrush > v0.19.0 start fails with vagrant-gemfile-... not found error #212

Open mnatter opened 8 years ago

mnatter commented 8 years ago

Hi - have been using the landrush plugin for awhile and very useful :-).

However, using the latest vagrant build (1.8.4) and either landrush v1.0.0 or 1.1.0-beta.1 on OSX 10.9.5, when I attempt to start the landrush plugin with the command vagrant plugin landrush start, I receive the following error on the terminal:

/var/folders/m_/.../.../vagrant-gemfile20160710-... not found

and the landrush DNS server never starts. A landrush pid file is present in the plugin data directory but no log file error is generated.

Uninstalling and reinstalling either plugin makes no difference, and clearing out the gems and reinstalling also no difference. But when I re-install landrush v0.19.0, everything works as expected, with no problems.

This looks very similar to this issue GemfileNotFound error #7495 posted to the Vagrant repo issue list - which is being ascribed for now to the vagrant-dns plugin code, so I am posting it here... I do have the vagrant-vmware-fusion plugin also, but seems like this was an issue with or without it.

On the other hand, I was also having some problems with install of any Vagrant plugin after I deleted all of my gemfiles and installing/reinstalling Vagrant (which occurred after I first had these problems with the landrush plugin). After manually installing the required version of ffi, these issues went away, but wondering if both issues may be bundler-related.

Thanks for any advice and/or fixes

hferentschik commented 8 years ago

I am also on OS X and don't see any problems. It might be a Vagrant version problem. I'll need to try to reproduce this first. Out of interest, have you tried downgrading Vagrant?

mnatter commented 8 years ago

Yes, tried downgrading to the prior release (1.8.3), but need to try to go down to 1.8.1 to see if that solves the problem. I did receive a similar error when restarting a VM already configured with landrush v0.19.0, that resolved after completely removing the landrush plugin, so I will have to investigate further also when I've some more time. Unfortunately, the earlier versions of Vagrant and the vagrant-vmware-fusion were causing problems with hgfs folder sharing on centos and other distros I am using, so more thorough, proper testing is going to take me some time unless I put up a dev environment. And some of my earlier errors when installing plugins complained of dev tools not being installed on Vagrant's embedded ruby / gem path, so might not be able to reproduce the error that way.

Thanks for helping troubleshoot.

bstoots commented 8 years ago

I've just encountered the same issue on my dev machine:

C:/HashiCorp/Vagrant/embedded/gems/gems/bundler-1.12.5/lib/bundler/definition.rb:23:in `build': C:/Users/bstoo/AppData/Local/Temp/vagrant-gemfile20160725-43776-34oiwn not found (Bundler::GemfileNotFound)
        from C:/HashiCorp/Vagrant/embedded/gems/gems/bundler-1.12.5/lib/bundler.rb:123:in `definition'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/bundler-1.12.5/lib/bundler.rb:91:in `setup'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/bundler-1.12.5/lib/bundler/setup.rb:19:in `<top (required)>'
        from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'

Environment in question:

I can confirm that everything was working fine on Vagrant 1.8.4 / Virtualbox 5.0.26 so likely something that was changed between Vagrant 1.8.4 -> 1.8.5.

hferentschik commented 8 years ago

@bstoots Thanks for the heads up. I have not upgraded to 1.8.5 yet, but will try to do so asap to see whether I can then reproduce the issue.

bstoots commented 8 years ago

@hferentschik No worries, I love this plugin and appreciate all your work.

dwillitzer commented 8 years ago

Just encountered same issue as @bstoots exception is on OSX 10.11.6

/opt/vagrant/embedded/gems/gems/bundler-1.12.5/lib/bundler/definition.rb:23:in `build': /var/folders/dd/77s05wdn7qx2fpwwx8zphhl00000gn/T/vagrant-gemfile20160730-6620-13hb1ei not found (Bundler::GemfileNotFound)
    from /opt/vagrant/embedded/gems/gems/bundler-1.12.5/lib/bundler.rb:123:in `definition'
    from /opt/vagrant/embedded/gems/gems/bundler-1.12.5/lib/bundler.rb:91:in `setup'
    from /opt/vagrant/embedded/gems/gems/bundler-1.12.5/lib/bundler/setup.rb:19:in `<top (required)>'
    from /opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'

Environments Combinations:

@hferentschik I am running into the same issues as @bstoots. I can reproduce this issue but can not successfully get the service to run with any of the environment combinations. Any thoughts?

bstoots commented 8 years ago

@djdesign You might try leaving the terminal you ran vagrant up from open. I found on my Windows box that with Virtualbox 5.0.x and Vagrant 1.8.4 if I close the terminal the DNS daemon exits and I can't restart it using the landrush CLI. In order to get it going again I have to vagrant reload a landrush enabled VM. Haven't had a chance to dig into what exactly is happening yet.

dwillitzer commented 8 years ago

@bstoots I can see it working now, Thank you. A nice work around I found is using Vagrant Manager. By utilizing this tool/application makes process much easier and operate error free.

But still would love to know when this other issue is persistent that you and I are running into with the Landrush CLI via bash.

trivoallan commented 8 years ago

Same problem with :

amosshapira commented 8 years ago

I'm hitting the same problem with similar versions:

Trying to reload landrush-dependent virtual machines doesn't help.

As a temporary work-around, I pinned landrush to version 0.19.0 and it works.

thevuong commented 7 years ago

vagrant plugin install landrush

Installing the 'landrush' plugin. This can take a few minutes... Building native extensions. This could take a while... Bundler, the underlying system Vagrant uses to install plugins, reported an error. The error is shown below. These errors are usually caused by misconfigured plugin installations or transient network issues. The error from Bundler is:

ERROR: Failed to build gem native extension.

current directory: C:/Users/thevuong/.vagrant.d/gems/2.3.4/gems/eventmachine-1.0.9.1/ext

"C:/Program Files (x86)/HashiCorp/Vagrant/embedded/mingw64/bin/ruby.exe" -r ./siteconf20170816-3996-1pf3za9.rb extconf.r b 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=C:/Program Files (x86)/HashiCorp/Vagrant/embedded/mingw64/bin/$(RUBY_BASE_NAME) --with-ssl-dir --without-ssl-dir --with-ssl-include --without-ssl-include=${ssl-dir}/include --with-ssl-lib --without-ssl-lib=${ssl-dir}/lib --with-openssl-config --without-openssl-config --with-pkg-config --without-pkg-config C:/Program Files (x86)/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/mkmf.rb:456:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/mkmf.rb:541:intry_link0' from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/mkmf.rb:556:in try_link' from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/mkmf.rb:657:intry_ldflags' from C:/Program Files (x86)/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/mkmf.rb:1813:in pkg_config' from extconf.rb:65:inpkg_config_wrapper' from extconf.rb:92:in `

'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

C:/Users/thevuong/.vagrant.d/gems/2.3.4/extensions/x64-mingw32/2.3.0/eventmachine-1.0.9.1/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in C:/Users/thevuong/.vagrant.d/gems/2.3.4/gems/eventmachine-1.0.9.1 for inspection. Results logged to C:/Users/thevuong/.vagrant.d/gems/2.3.4/extensions/x64-mingw32/2.3.0/eventmachine-1.0.9.1/gem_make.out