Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wanted ruby3.0 on Ubuntu 22.04 LTS support #241

Open
ihatomorio opened this issue Oct 19, 2022 · 0 comments
Open

Wanted ruby3.0 on Ubuntu 22.04 LTS support #241

ihatomorio opened this issue Oct 19, 2022 · 0 comments

Comments

@ihatomorio
Copy link

Hello,

I using this plugin on Ubuntu 22.04 LTS.
While I using this plugin, it fails with this message.

/root/.vagrant.d/gems/3.0.2/gems/vagrant-proxyconf-2.0.10/lib/vagrant-proxyconf/userinfo_uri.rb:35:in `user': undefined method `decode' for URI:Module (NoMethodError)
(snip: sorry, I prohibited copy-pasting from my working terminal.)

Ruby 3.0 not supporting URI.decode method. So please use URI.decode_www_form method.
I couldn't send PR with my permissions, so I describe diff below.

diff --git a/lib/vagrant-proxyconf/userinfo_uri.rb b/lib/vagrant-proxyconf/userinfo_uri.rb
index 456c454..5f2e357 100644
--- a/lib/vagrant-proxyconf/userinfo_uri.rb
+++ b/lib/vagrant-proxyconf/userinfo_uri.rb
@@ -32,13 +32,13 @@ module VagrantPlugins
 
       # @return [String] the username
       def user
-        return URI.decode(@uri.user) if @uri.user
+        return URI.decode_www_form(@uri.user) if @uri.user
         @uri.user
       end
 
       # @return [String] the password
       def pass
-        return URI.decode(@uri.password) if @uri.password
+        return URI.decode_www_form(@uri.password) if @uri.password
         @uri.password
       end

Could it fix it? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant