Undefined method '+' for nil: NilClass (when trying to confirm acceptance of a REST token)

I am trying to test Magento REST Api tokens using the Ruby oauth client. I am working on Windows 7, Ruby 2.2.0 (Magento 1.7.0.2 is hosted on a remote Ubuntu server).

1) I execute the following command through the CLI:

oauth --verbose --query-string --consumer-key ABCD --consumer-secret ABCD --access-token -url https://www.mywebsite.com/ch_fr/oauth/token --authorize-url https://www.mywebsite.com/ch_fr/admin/oauth_authorize --request-token-url mywebsite.com/ch_fr/oauth/initiate authorize

Note: URLs in my team are everything starting with " https: // www " (my low rep on StackOverflow prevents me from posting more than 2 URLs) p>

2) The ruby ​​client will display the following message:

Server appears to support OAuth 1.0a; enabling support.
Please visit this url to authorize:
https://www.mywebsite.com/ch_fr/admin/oauth_authorize?oauth_token=ABCD
Please enter the verification code provided by the SP (oauth_verifier):

3) After successfully connecting to oauth_authorize URL, login, accepts the token and get the code verifier, I fill in the code in my Windows shell + press Enter.

Then, here is my problem, the following message appears:

RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/net/http.rb:1532:in `addr_port': undefined method `+' for nil:NilClass (NoMet
Error)
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/net/http.rb:1465:in `begin_transport'
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/net/http.rb:1410:in `transport_request'
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/net/http.rb:1384:in `request'
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/net/http.rb:1377:in `block in request'
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/net/http.rb:853:in `start'
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/net/http.rb:1375:in `request'
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/oauth-0.5.1/lib/oauth/consumer.rb:161:in `request'
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/oauth-0.5.1/lib/oauth/consumer.rb:195:in `token_reques

     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/oauth-0.5.1/lib/oauth/tokens/request_token.rb:20:in `g
access_token'
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/oauth-0.5.1/lib/oauth/cli.rb:80:in `execute'
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/oauth-0.5.1/lib/oauth/cli.rb:19:in `execute'
     from C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/oauth-0.5.1/bin/oauth:5:in `<top (required)>'
     from C:/RailsInstaller/Ruby2.2.0/bin/oauth:23:in `load'
     from C:/RailsInstaller/Ruby2.2.0/bin/oauth:23:in `<main>'

-, Magento Ruby (, "nil" )? Magento? - Ruby? ?

2: Ruby;)

. .

+4
1

, URL-, , , Net:: HTTP.new(url, nil), -. , URL-, .

0

All Articles