运行 vagrant 时方法丢失错误

Method missing error when running vagrant

我的开发环境依赖于vagrant和virtual box。直到几天前,一切都可以正常工作。从那以后,每次我尝试 运行 vagrant up 时,我都会收到此错误消息。

我真的不知道该怎么办。有什么建议吗?

C:/Users/D3TzH/.vagrant.d/gems/2.4.4/gems/vagrant-triggers-0.5.3/lib/vagrant-triggers/dsl.rb:90:in `method_missing': undefined method `run_remote=' for #<VagrantPlugins::Triggers::DSL:0x00000000049cb5b8> (NoMethodError)
        from D:/Projects/D3TzH/D3TzH-environment/Vagrantfile:41:in `block (2 levels) in <top (required)>'
        from C:/Users/D3TzH/.vagrant.d/gems/2.4.4/gems/vagrant-triggers-0.5.3/lib/vagrant-triggers/dsl.rb:11:in `instance_eval'
        from C:/Users/D3TzH/.vagrant.d/gems/2.4.4/gems/vagrant-triggers-0.5.3/lib/vagrant-triggers/dsl.rb:11:in `fire!'
        from C:/Users/D3TzH/.vagrant.d/gems/2.4.4/gems/vagrant-triggers-0.5.3/lib/vagrant-triggers/action/trigger.rb:52:in `block in fire_triggers'
        from C:/Users/D3TzH/.vagrant.d/gems/2.4.4/gems/vagrant-triggers-0.5.3/lib/vagrant-triggers/action/trigger.rb:51:in `each'
        from C:/Users/D3TzH/.vagrant.d/gems/2.4.4/gems/vagrant-triggers-0.5.3/lib/vagrant-triggers/action/trigger.rb:51:in `fire_triggers'
        from C:/Users/D3TzH/.vagrant.d/gems/2.4.4/gems/vagrant-triggers-0.5.3/lib/vagrant-triggers/action/trigger.rb:18:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/builtin/before_trigger.rb:23:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/warden.rb:50:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/builder.rb:116:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/runner.rb:102:in `block in run'
        from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/util/busy.rb:19:in `busy'
        from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/action/runner.rb:102:in `run'
        from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/machine.rb:238:in `action_raw'
        from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/machine.rb:209:in `block in action'
        from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/environment.rb:615:in `lock'
        from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/machine.rb:195:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/machine.rb:195:in `action'
        from C:/HashiCorp/Vagrant/embedded/gems/2.2.4/gems/vagrant-2.2.4/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'

随着 Vagrant 2.1.0 的发布,vagrant-triggers 插件的功能被合并到核心 Vagrant 产品中。如 Vagrant 2.1.0 announcement 中所述,该插件现在与 Vagrant >= 2.1.0 的版本不兼容:

This work was heavily inspired by the fantastic community plugin vagrant-triggers by @emyl. It is a complete rewrite of the plugin, so the two are not compatible.

鉴于这种情况,最有可能通过卸载第三方 vagrant-triggers 插件来修复错误。