Last modified: 2014-10-19 00:46:57 UTC
Using an up-to-date vagrant checkout: Gilles-Dubucs-MacBook-Air:vagrant gdubuc$ ./setup.sh Plugin vagrant-vbguest is already installed Installing plugin mediawiki-vagrant-0.2.0.gem - Installing the 'mediawiki-vagrant-0.2.0.gem --version '0.2.0'' plugin. This can take a few minutes... - Installed the plugin 'mediawiki-vagrant (0.2.0)'! Failed to load the "mediawiki-vagrant" plugin. View logs for more details. Vagrant failed to initialize at a very early stage: There was an error loading a Vagrantfile. The file being loaded and the error message are shown below. This is usually caused by a syntax error. Path: /Users/gdubuc/Dropbox/Mediawiki/vagrant/Vagrantfile Message: uninitialized constant MediaWikiVagrant::Environment Failed to execute command `vagrant config --required` (pid 42568 exit 1) I've tried rolling back a few commits in the past, seeing that you've been doing a lot of refactoring, and it didn't help. Any quick workaround would be much appreciated.
We've found a workaround, commenting out this block does the trick: config.vm.provision :lsb_check do |lsb| lsb.version = '14.04' end In addition to adding: require 'mediawiki-vagrant/environment' Before MediaWikiVagrant::Environment.new
Gilles reported on irc that he has Vagrant 1.4.3 installed. This may be part of the problem. I wonder if we should start checking for a minimum Vagrant version and/or testing plugin changes in a wider variety of Vagrant versions ourselves.
Updating vagrant to the latest stable fixed it
I would guess that the older Vagrant ships with a ruby version that doesn't like something our plugin is doing. Maybe use of require_relative?
1.4.3 is the current version in Debian and Ubuntu apt repos. Our documentation says "Get the latest Vagrant (the version must be 1.2.6 or higher; For NFS, use 1.5.4 and up)". So we should either update the docs to say 1.6.0+ and check somehow in the Vagrantfile or fix things to work back to at least 1.4.3.
Repro'd this on OS X by specifying "v1.4.3" in the Gemfile and running `bundle exec vagrant config --required`. Gemfile: gem 'vagrant', git: 'https://github.com/mitchellh/vagrant.git', tag: 'v1.4.3'
Looks like Vagrant 1.4 doesn't support options for commands—despite the fact the plugin API interface is supposed to be the same. :/ VAGRANT_LOG=debug vagrant config --required ERROR root: Failed to load plugin: mediawiki-vagrant ERROR root: -- Error: #<ArgumentError: wrong number of arguments (2 for 1)> ERROR root: -- Backtrace: ERROR root: /usr/lib/ruby/vendor_ruby/vagrant/plugin/v2/plugin.rb:84:in `command' /home/vagrant/.vagrant.d/gems/gems/mediawiki-vagrant-0.2.0/lib/mediawiki-vagrant.rb:35:in `<class:Plugin>' /home/vagrant/.vagrant.d/gems/gems/mediawiki-vagrant-0.2.0/lib/mediawiki-vagrant.rb:2:in `<module:MediaWikiVagrant>' /home/vagrant/.vagrant.d/gems/gems/mediawiki-vagrant-0.2.0/lib/mediawiki-vagrant.rb:1:in `<top (required)>' /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in `require' /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require' /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in `require' /usr/lib/ruby/vendor_ruby/vagrant.rb:204:in `require_plugin' /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:760:in `block in load_plugins' /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:751:in `each' /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:751:in `load_plugins' /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:132:in `initialize' /usr/bin/vagrant:105:in `new' /usr/bin/vagrant:105:in `<main>' INFO interface: error: Failed to load the "mediawiki-vagrant" plugin. View logs for more details. Failed to load the "mediawiki-vagrant" plugin. View logs for more details.
Change 166913 had a related patch set uploaded by Dduvall: Restore compatibility with vagrant 1.4 https://gerrit.wikimedia.org/r/166913
Change 166913 merged by jenkins-bot: Restore compatibility with vagrant 1.4 https://gerrit.wikimedia.org/r/166913