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

hub am errors "wrong number of arguments" #1013

Closed
samdark opened this Issue Oct 18, 2015 · 7 comments

Comments

Projects
None yet
4 participants
@samdark

samdark commented Oct 18, 2015

hub am https://github.com/yiisoft/yii2/pull/9941
/usr/local/bin/hub:75:in `initialize': wrong number of arguments (9 for 1) (ArgumentError)
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:1030:in `new'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:1030:in `proxy_uri'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:1017:in `proxy?'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:868:in `connect'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:862:in `do_start'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:851:in `start'
    from /usr/local/bin/hub:473:in `perform_request'
    from /usr/local/bin/hub:588:in `perform_request'
    from /usr/local/bin/hub:418:in `get'
    from /usr/local/bin/hub:329:in `pullrequest_patch'
    from /usr/local/bin/hub:1958:in `am'
    from /usr/local/bin/hub:1586:in `run'
    from /usr/local/bin/hub:2508:in `initialize'
    from /usr/local/bin/hub:2512:in `new'
    from /usr/local/bin/hub:2512:in `execute'
    from /usr/local/bin/hub:2563:in `<main>'
@mislav

This comment has been minimized.

Show comment
Hide comment
@mislav

mislav Oct 18, 2015

Member

Hi, you seem to be using a really old version of hub. Can you try with the newest version? On Mac, it's easily installable with Homebrew: brew upgrade hub. Then verify hub version is at least 2.2. Then ping us back! Thanks

Member

mislav commented Oct 18, 2015

Hi, you seem to be using a really old version of hub. Can you try with the newest version? On Mac, it's easily installable with Homebrew: brew upgrade hub. Then verify hub version is at least 2.2. Then ping us back! Thanks

@mislav mislav added the unconfirmed label Oct 18, 2015

@samdark

This comment has been minimized.

Show comment
Hide comment
@samdark

samdark Oct 19, 2015

I'm not using brew. I think I'm using the one I built from master branch.

samdark commented Oct 19, 2015

I'm not using brew. I think I'm using the one I built from master branch.

@mislav

This comment has been minimized.

Show comment
Hide comment
@mislav

mislav Oct 19, 2015

Member

I understand. You still have the old version, though. Installing from Homebrew would give you the latest release. Or you can build from master again, but you will need Go compiler. You can also download the latest precompiled binary for OS X.

Let me know if that worked

Member

mislav commented Oct 19, 2015

I understand. You still have the old version, though. Installing from Homebrew would give you the latest release. Or you can build from master again, but you will need Go compiler. You can also download the latest precompiled binary for OS X.

Let me know if that worked

@samdark samdark closed this Oct 20, 2015

@samdark

This comment has been minimized.

Show comment
Hide comment
@samdark

samdark Oct 20, 2015

Worked. I was copying to wrong bin. My fault.

samdark commented Oct 20, 2015

Worked. I was copying to wrong bin. My fault.

@seanmakesgames

This comment has been minimized.

Show comment
Hide comment
@seanmakesgames

seanmakesgames Nov 4, 2015

Just hit this using brew. Uninstalled and reinstalled hub from brew and the hub version is still 1.12

seanmakesgames commented Nov 4, 2015

Just hit this using brew. Uninstalled and reinstalled hub from brew and the hub version is still 1.12

@seanmakesgames

This comment has been minimized.

Show comment
Hide comment
@seanmakesgames

seanmakesgames Nov 4, 2015

brew update solved the issue.

seanmakesgames commented Nov 4, 2015

brew update solved the issue.

@benmathes

This comment has been minimized.

Show comment
Hide comment
@benmathes

benmathes Mar 29, 2016

I came across this same error:

=> hub create                                                                                                                                                                                                                                                                 
/usr/local/bin/hub:74:in `initialize': wrong number of arguments (9 for 1) (ArgumentError)                                                                                                                                                                                    
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:1030:in `new'                                                                                                                                                              
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:1030:in `proxy_uri'                                                                                                                                                        
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:1017:in `proxy?'                                                                                                                                                           
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:868:in `connect'                                                                                                                                                           
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:862:in `do_start'                                                                                                                                                          
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:851:in `start'                                                                                                                                                             
        from /usr/local/bin/hub:451:in `perform_request'                                                                                                                                                                                                                      
        from /usr/local/bin/hub:566:in `perform_request'                                                                                                                                                                                                                      
        from /usr/local/bin/hub:411:in `get'                                                                                                                                                                                                                                  
        from /usr/local/bin/hub:291:in `repo_info'                                                                                                                                                                                                                            
        from /usr/local/bin/hub:296:in `repo_exists?'                                                                                                                                                                                                                         
        from /usr/local/bin/hub:2017:in `create'                                                                                                                                                                                                                              
        from /usr/local/bin/hub:1560:in `run'                                                                                                                                                                                                                                 
        from /usr/local/bin/hub:2480:in `initialize'                                                                                                                                                                                                                          
        from /usr/local/bin/hub:2484:in `new'                                                                                                                                                                                                                                 
        from /usr/local/bin/hub:2484:in `execute'                                                                                                                                                                                                                             
        from /usr/local/bin/hub:2535:in `<main>'

And I thought I had the latest hub:

=> brew upgrade hub                                                                                                                                                                                                                                                           
Error: hub 2.2.3 already installed

But my symlink was pointing to the old version!

=> ls -al $(which hub)                                                                                                                                                                                                                                                       
lrwxr-xr-x  1 benmathes  admin  28 Mar 29 09:40 /usr/local/bin/hub -> ../Cellar/hub/1.12.0/bin/hub 

Which was fixed by: brew uninstall --force hub; brew update; brew install hub

Now the symlink is correct (note the 2.2.3 in the symlink target):

=> ls -al $(which hub)                                                                                                                                                                                                                                                        
lrwxr-xr-x  1 benmathes  admin  27 Mar 29 10:00 /usr/local/bin/hub -> ../Cellar/hub/2.2.3/bin/hub

and now hub create works.

benmathes commented Mar 29, 2016

I came across this same error:

=> hub create                                                                                                                                                                                                                                                                 
/usr/local/bin/hub:74:in `initialize': wrong number of arguments (9 for 1) (ArgumentError)                                                                                                                                                                                    
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:1030:in `new'                                                                                                                                                              
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:1030:in `proxy_uri'                                                                                                                                                        
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:1017:in `proxy?'                                                                                                                                                           
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:868:in `connect'                                                                                                                                                           
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:862:in `do_start'                                                                                                                                                          
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:851:in `start'                                                                                                                                                             
        from /usr/local/bin/hub:451:in `perform_request'                                                                                                                                                                                                                      
        from /usr/local/bin/hub:566:in `perform_request'                                                                                                                                                                                                                      
        from /usr/local/bin/hub:411:in `get'                                                                                                                                                                                                                                  
        from /usr/local/bin/hub:291:in `repo_info'                                                                                                                                                                                                                            
        from /usr/local/bin/hub:296:in `repo_exists?'                                                                                                                                                                                                                         
        from /usr/local/bin/hub:2017:in `create'                                                                                                                                                                                                                              
        from /usr/local/bin/hub:1560:in `run'                                                                                                                                                                                                                                 
        from /usr/local/bin/hub:2480:in `initialize'                                                                                                                                                                                                                          
        from /usr/local/bin/hub:2484:in `new'                                                                                                                                                                                                                                 
        from /usr/local/bin/hub:2484:in `execute'                                                                                                                                                                                                                             
        from /usr/local/bin/hub:2535:in `<main>'

And I thought I had the latest hub:

=> brew upgrade hub                                                                                                                                                                                                                                                           
Error: hub 2.2.3 already installed

But my symlink was pointing to the old version!

=> ls -al $(which hub)                                                                                                                                                                                                                                                       
lrwxr-xr-x  1 benmathes  admin  28 Mar 29 09:40 /usr/local/bin/hub -> ../Cellar/hub/1.12.0/bin/hub 

Which was fixed by: brew uninstall --force hub; brew update; brew install hub

Now the symlink is correct (note the 2.2.3 in the symlink target):

=> ls -al $(which hub)                                                                                                                                                                                                                                                        
lrwxr-xr-x  1 benmathes  admin  27 Mar 29 10:00 /usr/local/bin/hub -> ../Cellar/hub/2.2.3/bin/hub

and now hub create works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment