Vagrant Digital Ocean Plugin Broken with 2.3.6

After upgrade to Vagrant 2.3.6, the Digital Ocean plugin no longer works. The error specifically is in the i18n-1.13.0 library.

Any ideas on how to fix this? The maintainers of the plugin are long gone and it has been abandoned since 2020.

I see that the ArgumentError is happening in the following lines of code:

Here is the error:

% vagrant up                        
Bringing machine 'default' up with 'digital_ocean' provider...
/opt/vagrant/embedded/gems/gems/i18n-1.13.0/lib/i18n.rb:210:in `translate': wrong number of arguments (given 2, expected 0..1) (ArgumentError)
	from /Users/username/.vagrant.d/gems/3.1.4/gems/vagrant-digitalocean-0.9.5/lib/vagrant-digitalocean/actions/setup_key.rb:26:in `call'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.6/lib/vagrant/action/warden.rb:48:in `call'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.6/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.6/lib/vagrant/action/warden.rb:48:in `call'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.6/lib/vagrant/action/builder.rb:180:in `call'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.6/lib/vagrant/action/runner.rb:101:in `block in run'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.6/lib/vagrant/util/busy.rb:19:in `busy'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.6/lib/vagrant/action/runner.rb:101:in `run'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.6/lib/vagrant/action/builtin/call.rb:53:in `call'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.6/lib/vagrant/action/warden.rb:48:in `call'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.6/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.6/lib/vagrant/action/warden.rb:48:in `call'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.6/lib/vagrant/action/builder.rb:180:in `call'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.6/lib/vagrant/action/runner.rb:101:in `block in run'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.6/lib/vagrant/util/busy.rb:19:in `busy'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.6/lib/vagrant/action/runner.rb:101:in `run'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.6/lib/vagrant/machine.rb:248:in `action_raw'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.6/lib/vagrant/machine.rb:217:in `block in action'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.6/lib/vagrant/environment.rb:631:in `lock'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.6/lib/vagrant/machine.rb:203:in `call'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.6/lib/vagrant/machine.rb:203:in `action'
	from /opt/vagrant/embedded/gems/gems/vagrant-2.3.6/lib/vagrant/batch_action.rb:86:in `block (2 levels) in run'

This code is also referenced in the error:

This explains the underlying reason for why the error is being encountered. The fix would be to adjust the original you have provided:

env[:ui].info I18n.t('vagrant_digital_ocean.info.using_key', {
  :name => ssh_key_name
})

to:

env[:ui].info I18n.t('vagrant_digital_ocean.info.using_key',
  :name => ssh_key_name
)

Cheers!

1 Like

This problem has been fixed in the latest version of the plugin v0.9.6.

Go update the plugin if you’re experiencing this issue.