kickscraper icon indicating copy to clipboard operation
kickscraper copied to clipboard

Faraday::Error::ConnectionFailed

Open mattmill30 opened this issue 6 years ago • 7 comments

I have installed Kickscraper onto a fresh Ruby 2.6.1 and Gems 3.0.2, but encounter the following error and trace when launching: 'C:\Program Files\Ruby\Ruby26\lib\ruby\gems\2.6.0\gems\kickscraper-0.2.4>rake console' irb(main):001:0> c = Kickscraper.client

Faraday::Error::ConnectionFailed (Failed to open TCP connection to localhost:8888 (No connection could be made because the target machine actively refused it. - connect(2) for "localhost" port 8888))

Traceback (most recent call last): 16: from C:/Program Files/Ruby/Ruby26/lib/ruby/gems/2.6.0/gems/faraday-0. 8.11/lib/faraday/request/url_encoded.rb:14:in call' 15: from C:/Program Files/Ruby/Ruby26/lib/ruby/gems/2.6.0/gems/faraday-0. 8.11/lib/faraday/response.rb:8:in call' 14: from C:/Program Files/Ruby/Ruby26/lib/ruby/gems/2.6.0/gems/faraday_mi ddleware-0.13.1/lib/faraday_middleware/response/follow_redirects.rb:75:in `call'

   13: from C:/Program Files/Ruby/Ruby26/lib/ruby/gems/2.6.0/gems/faraday_mi

ddleware-0.13.1/lib/faraday_middleware/response/follow_redirects.rb:87:in perfo rm_with_redirection' 12: from C:/Program Files/Ruby/Ruby26/lib/ruby/gems/2.6.0/gems/faraday_mi ddleware-0.13.1/lib/faraday_middleware/response_middleware.rb:31:in call' 11: from C:/Program Files/Ruby/Ruby26/lib/ruby/gems/2.6.0/gems/kickscrape r-0.2.4/lib/kickscraper/connection.rb:25:in call' 10: from C:/Program Files/Ruby/Ruby26/lib/ruby/gems/2.6.0/gems/faraday-0. 8.11/lib/faraday/adapter/net_http.rb:39:in call' 9: from C:/Program Files/Ruby/Ruby26/lib/ruby/gems/2.6.0/gems/faraday-0. 8.11/lib/faraday/adapter/net_http.rb:76:in perform_request' 8: from C:/Program Files/Ruby/Ruby26/lib/ruby/2.6.0/net/http.rb:1470:in request' 7: from C:/Program Files/Ruby/Ruby26/lib/ruby/2.6.0/net/http.rb:919:in start' 6: from C:/Program Files/Ruby/Ruby26/lib/ruby/2.6.0/net/http.rb:930:in do_start' 5: from C:/Program Files/Ruby/Ruby26/lib/ruby/2.6.0/net/http.rb:945:in connect' 4: from C:/Program Files/Ruby/Ruby26/lib/ruby/2.6.0/timeout.rb:103:int imeout' 3: from C:/Program Files/Ruby/Ruby26/lib/ruby/2.6.0/timeout.rb:93:in bl ock in timeout' 2: from C:/Program Files/Ruby/Ruby26/lib/ruby/2.6.0/net/http.rb:946:in block in connect' 1: from C:/Program Files/Ruby/Ruby26/lib/ruby/2.6.0/net/http.rb:949:in ` rescue in block in connect' Faraday::Error::ConnectionFailed (Failed to open TCP connection to localhost:888 8 (No connection could be made because the target machine actively refused it. - connect(2) for "localhost" port 8888))

mattmill30 avatar Feb 26 '19 22:02 mattmill30

Includes "'C:\Program Files\Ruby\Ruby26\bin\gem' install kickscraper" console output. Kickscraper_installation_procedure.txt

mattmill30 avatar Feb 26 '19 22:02 mattmill30

I'm traveling at the moment, so I can't look I to this fully until a little later. But I think that it's trying to connect to a proxy (localhost:8888). Look for the proxy settings in the code and comment them out. Let me know if that works.

On Feb 26, 2019, at 2:49 PM, mattmill30 [email protected] wrote:

Includes "'C:\Program Files\Ruby\Ruby26\bin\gem' install kickscraper" console output. Kickscraper_installation_procedure.txt

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

benrugg avatar Feb 26 '19 23:02 benrugg

I've deleted the :proxy lines in connection.rb and configure.rb, but the error hasn't changed.

I notice the issue refers to faraday url_encoded.rb. I don't know whether it's relevant, but when Ruby was installed, the UTF-8 default encoding checkbox wasn't ticked.

mattmill30 avatar Feb 26 '19 23:02 mattmill30

Shoot... I don't really have any idea what would cause that. I'm not sure how much I'll be able to help.

On Feb 26, 2019, at 3:58 PM, mattmill30 [email protected] wrote:

I've deleted the :proxy lines in connection.rb and configure.rb, but the error hasn't changed.

I notice the issue refers to faraday url_encoded.rb. I don't know whether it's relevant, but when Ruby was installed, the UTF-8 default encoding checkbox wasn't ticked.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

benrugg avatar Feb 27 '19 00:02 benrugg

@benrugg, do you have any ideas following the response I received from Faraday? https://github.com/lostisland/faraday/issues/886#issuecomment-467825239

mattmill30 avatar Feb 27 '19 13:02 mattmill30

Yes, they're exactly right. Whatever you tried to comment out didn't work, since proxy == 'localhost:8888'. Just set it to nil, me also set the email and password to real values. (Do that all at runtime, not in the kickscraper code)

On Feb 27, 2019, at 7:08 AM, mattmill30 [email protected] wrote:

@benrugg, do you have any ideas following the response I received from Faraday? lostisland/faraday#886 (comment)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

benrugg avatar Feb 27 '19 17:02 benrugg