-
Notifications
You must be signed in to change notification settings - Fork 572
Undefined HashMap method except
with Vagrant 2.2.7
#566
Comments
except
with Vagrant 2.2.7
Actually nothing to do with They originally provided Hash.except: https://github.com/ruby-i18n/i18n/blob/1e67c8dd80933703328be524d3d8c4f21cb8c5a3/lib/i18n/core_ext/hash.rb A quick fix for anyone experiencing this issue is to place the following in your
|
I've also seen this bug after upgrading to Vagrant 2.2.7. I downgraded to Vagrant 2.2.5 as a quick fix. I did not try @externl 's Quick fix yet. |
I can confirm that @externl's workaround works. Vagrant 2.2.7, ruby 2.7.0p0, Arch Linux. |
I can confirm that @externl's workaround works. Vagrant 2.2.7 Win10 |
Getting this issue as well. I just edited 'vagrant-aws/action/connect_aws.rb' line 41 to remove the 'except' call. That gave me lots of warnings but just seemed to work. I would think this is easy to fix no? |
Can confirm the fix from @externl works as well. |
Fix from @externl works for me as well. Ubuntu 18.04, Vagrant 2.2.7 |
See mitchellh/vagrant-aws#566 Since we test the bosh-agent against linux and windows, we started testing against go1.14 on windows and go1.13 on linux. I decided to update the bosh-agent linux docker image to install go1.14. The new docker image brought Ruby 2.5+ was installed and vagrant-aws needed to be updated. I decided to keep going and update the plugin (d6d7ba9). This led to this error with vagrant-aws and Ruby's i18n. I could undo all of this by pinning Ruby in our docker image so that none of these dependencies are updated, but I think the risk of keeping this monkeypatch around for a bit is fine.
Actually... what @externl said... if you add it near the top of connect_aws.rb seems to workaround (or maybe fix?) the issue. I opened ~/.vagrant.d/gems/2.6.6/gems/vagrant-aws-0.7.2/lib/vagrant-aws/action/connect_aws.rb and added, per @externl, just after the two require lines:
I have not studied the problem more in-depth. I just tried with vagrant 2.2.9 and plugin version 0.7.2. |
The issue is that vagrant core upgraded a plugin which this project depends. Unfortunately the only real fix is for @mitchellh to fix or accept a PR fixing it. The usage of |
somebody must have forked and fixed this. |
@guzzijones I wonder if they abandoned this project :( ... I was considering forking it and review/apply the fixes I can see here... there are a few pull requests open. However, I do not use this nearly enough as to justify the time investment. I hope @mitchellh is ok. |
A less intrusive way I've found works is putting @externl's solution in a separate file and adding to the Vagrantfile |
Since `Hash#except` is not in standard Ruby and Vagrant removed `active_support` that provides the polyfill. Resolves mitchellh#566
Dunno if we can get one of the maintainers to merge this, but at least here's a minimal patch that should work. Testing it locally now. (FYI, @mitchellh seems like he might be busy running something...) |
URL: mitchellh/vagrant-aws#566 Signed-off-by: Samuli Seppänen <[email protected]>
Why is this issue still not fixed, I saw it with 2.2.10 and mattock workaround still works |
I have also encountered this issue in 2.2.10 just like @liangbin-pub (on MacOS Catalina 10.15.7) |
URL: mitchellh/vagrant-aws#566 Signed-off-by: Samuli Seppänen <[email protected]>
Since Hash#except is not in standard Ruby and Vagrant removed active_support i18n that provides the polyfill in Vagrant 2.2.7; even the polyfill was just Hash#slice minus the requested keys. Seemed simpler to inline than monkey-patch Hash... Resolves mitchellh#566 Based on mitchellh#575
As a temporary solution you can use my Gem Installation instructions:
|
Same issue, fix from @externl works for me as well on:
|
Same issue and @externl 's with @soulhunter 's updates works like a charm on:
|
See mitchellh/vagrant-aws#566 We were getting this error in our integration tests. It seems there is an issue introduced in vagrant 2.2.7. We need at least version 2.2.8 for another fix. Co-authored-by: Kenneth Lakin <[email protected]> Co-authored-by: Maria Shaldybin <[email protected]>
We had let this bitrot and it required using an old version of Vagrant. Unfortunatly there is the need to put in a hack due to this issue on the vagrant-aws provider mitchellh/vagrant-aws#566. I suspect that this provider is now abandoned as there is even a PR open to fix it mitchellh/vagrant-aws#575. I propose that we look to remove vagrant in the not too distant future.
We had let this bitrot and it required using an old version of Vagrant. Unfortunatly there is the need to put in a hack due to this issue on the vagrant-aws provider mitchellh/vagrant-aws#566. I suspect that this provider is now abandoned as there is even a PR open to fix it mitchellh/vagrant-aws#575. I propose that we look to remove vagrant in the not too distant future.
is this broken on purpose to make vagrant hard to use?
|
@externl Thanks, worked for me as well. |
Reported 1.5 years ago and still broken in the latest version (a fresh install) of vagrant. 😞 $ vagrant --version
Vagrant 2.2.16
$ vagrant status
~/.vagrant.d/gems/2.6.7/gems/vagrant-aws-0.7.2/lib/vagrant-aws/action/connect_aws.rb:41:in `call': undefined method `except' for #<Hash:0x0000000002591a80> (NoMethodError)
from /opt/vagrant/embedded/gems/2.2.16/gems/vagrant-2.2.16/lib/vagrant/action/warden.rb:48:in `call'
... |
There hasn't been a new release since Jul 3, 2016. I think it's safe to say that this project has been abandoned. |
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
there are still use cases for this! Why can't we get a new release? Not everyone is using Kubernetes and/or Docker for everything! |
Looks like
activesupport
is now missing. Maybe it was bundled with vagrant it previous version?The text was updated successfully, but these errors were encountered: