Code Monkey home page Code Monkey logo

Comments (5)

toland avatar toland commented on August 18, 2024

Did you start script/test_server before running the specs?

from patron.

skyeagle avatar skyeagle commented on August 18, 2024

Where i can find it ? i don't have it in script directory.

I try to run spec becouse patron im my production application has a strange error "couldn't connect to host". It raise for a randomly URLs. For example:

ree-1.8.7-2010.01 > require 'rubygems'
=> true
ree-1.8.7-2010.01 > require 'patron'
=> true
ree-1.8.7-2010.01 > sess = Patron::Session.new
=> #Patron::Session:0x902e190
ree-1.8.7-2010.01 > sess.head("http://www.avast.com/rus/download-avast-home.html")
Patron::ConnectionFailed: couldn't connect to host

But i know what this URL is work!

curl --head "http://www.avast.com/rus/download-avast-home.html"
HTTP/1.1 200 OK
Date: Thu, 11 Feb 2010 07:56:19 GMT
Server: Apache
Last-Modified: Thu, 04 Feb 2010 06:25:37 GMT
ETag: "1b7c553-808e-67321a40"
Accept-Ranges: bytes
Content-Length: 32910
Content-Type: text/html

And same issue with other randomly URLs. I can't find any dependency for what may raise this error.
Can you help me?

from patron.

toland avatar toland commented on August 18, 2024

Where did you get the source from? A repository cloned from GitHub will have a script directory with two scripts "console" and "test_server".

I have not seen the behavior you describe and cannot reproduce it with the URL you provided. The fact that the error is intermittent indicates to me that the problem is an environmental one. The ConnectionFailed exception means that libcurl returned CURLE_COULDNT_CONNECT when establishing the connection. Perhaps there is an issue with your Internet connection or firewall?

from patron.

skyeagle avatar skyeagle commented on August 18, 2024

I tried run specs from installed gem. You can close this bug. Specs have already passed but issue with "couldn't connect to host" is still present on my two machines Ubuntu and CentOS with different internet connection and location. Maybe problem with the same version of libcurl...It needs additional investigation.
Thanks for help.

from patron.

toland avatar toland commented on August 18, 2024

OK. Let me know if you need anything else.

from patron.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.