Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

undefined method 'except' #568

Closed
rchekaluk opened this issue Apr 12, 2020 · 4 comments
Closed

undefined method 'except' #568

rchekaluk opened this issue Apr 12, 2020 · 4 comments

Comments

@rchekaluk
Copy link

After installing vagrant-aws per #567, the following error appears at runtime:

$ vagrant up --provider=aws

/home/REDACTED/.vagrant.d/gems/2.4.9/gems/vagrant-aws-0.7.2/lib/vagrant-aws/action/connect_aws.rb:41:in `call': undefined method `except' for #<Hash:0x0000000003311f48> (NoMethodError)
	from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/action/warden.rb:57:in `call'
	from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/action/builtin/before_trigger.rb:23:in `call'
	from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/action/warden.rb:57:in `call'
	from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/action/builtin/after_trigger.rb:26:in `call'
	from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/action/warden.rb:57:in `call'
	from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
	from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/action/warden.rb:57:in `call'
	from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/action/builtin/before_trigger.rb:23:in `call'
	from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/action/warden.rb:57:in `call'
	from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/action/builder.rb:116:in `call'
	from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/action/runner.rb:102:in `block in run'
	from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/util/busy.rb:19:in `busy'
	from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/action/runner.rb:102:in `run'
	from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/machine.rb:238:in `action_raw'
	from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/machine.rb:209:in `block in action'
	from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/machine.rb:191:in `block in action'
	from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/machine.rb:195:in `action'
	from /home/REDACTED/.vagrant.d/gems/2.4.9/gems/vagrant-aws-0.7.2/lib/vagrant-aws/provider.rb:32:in `state'
	from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/machine.rb:532:in `state'
	from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/machine.rb:146:in `initialize'
	from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/vagrantfile.rb:81:in `new'
	from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/vagrantfile.rb:81:in `machine'
	from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:715:in `machine'
	from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/plugin/v2/command.rb:180:in `block in with_target_vms'
	from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/plugin/v2/command.rb:204:in `block in with_target_vms'
	from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/plugin/v2/command.rb:186:in `each'
	from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/plugin/v2/command.rb:186:in `with_target_vms'
	from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/plugins/commands/up/command.rb:87:in `execute'
	from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/cli.rb:66:in `execute'
	from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/lib/vagrant/environment.rb:290:in `cli'
	from /opt/vagrant/embedded/gems/2.2.7/gems/vagrant-2.2.7/bin/vagrant:182:in `<main>'

Environment:

$ ruby --version
ruby 2.6.6p146 (2020-03-31 revision 67876) [x86_64-linux]

$ vagrant --version
Vagrant 2.2.7

$ gem list vagrant-aws

*** LOCAL GEMS ***

$ vagrant plugin list
fog-ovirt (1.0.1, global)
  - Version Constraint: 1.0.1
vagrant-aws (0.7.2, global)
vagrant-berkshelf (5.1.2, global)
vagrant-omnibus (1.5.0, global)

What am I missing?

@andrewrice
Copy link

Same issue here.

@Omar-El
Copy link

Omar-El commented Apr 14, 2020

i face the same problem

@jegj
Copy link

jegj commented Apr 14, 2020

Follow this: #566 (comment)

@rchekaluk
Copy link
Author

Duplicate of #566. Thanks @jegj!

ricamos added a commit to ricamos/vagrant_aws that referenced this issue Sep 24, 2021
Erro ao executar vagrant up --provider=aws.
Solução adicionar as seguintes linhas ao vagrante file:

class Hash
  def slice(*keep_keys)
    h = {}
    keep_keys.each { |key| h[key] = fetch(key) if has_key?(key) }
    h
  end unless Hash.method_defined?(:slice)
  def except(*less_keys)
    slice(*keys - less_keys)
  end unless Hash.method_defined?(:except)
end

Solução foi encontrada nas referências abaixo.

mitchellh/vagrant-aws#568
mitchellh/vagrant-aws#566

 On branch master
 Changes to be committed:
	modified:   README.md
	modified:   Vagrantfile
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants