# Net::HTTP and numerical adress

**URL:** <https://www.ruby-forum.com/t/net-http-and-numerical-adress/187636>\
**Category:** Ruby\
**Created:** [April 27, 2010, 7:40am UTC](https://www.ruby-forum.com/t/net-http-and-numerical-adress/187636 "2010-04-27T07:40:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Une\_BSSSSvue](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/b4bc9f/32.png) [@Une\_BSSSSvue](https://www.ruby-forum.com/u/Une_BSSSSvue)\
**Post date:** [April 27, 2010, 7:40am UTC](https://www.ruby-forum.com/t/net-http-and-numerical-adress/187636/1 "2010-04-27T07:40:46Z")

</div>

if i use :  
Net::HTTP.start(‘[http://88.183.xyz.uvw](http://88.183.xyz.uvw)’)  
with numerical (i don’t have a domain name)  
i get an error :

essais/download\_files.rb:16: no . floating literal anymore; put 0  
before dot  
[http://88.183.xyz.uvw](http://88.183.xyz.uvw)  
^

does it mean Net:HTTP wants to translate the numbers given ?  
being somehow a bug for an address right ?

---

<div class="post-metadata">

**Author:** ![Une\_BSSSSvue](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/b4bc9f/32.png) [@Une\_BSSSSvue](https://www.ruby-forum.com/u/Une_BSSSSvue)\
**Post date:** [April 27, 2010, 7:46am UTC](https://www.ruby-forum.com/t/net-http-and-numerical-adress/187636/2 "2010-04-27T07:46:37Z")

</div>

Une Bévue [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> does it mean Net:HTTP wants to translate the numbers given ?  
> not at all, i wasn’t reading the right line…  
> sorry for the noise

however it seems Net::HTTP can’t download a file from an unregistered  
domain :  
/opt/local/lib/ruby1.9/1.9.1/net/http.rb:581:in `initialize’:  
getaddrinfo: nodename nor servname provided, or not known (SocketError)

---

<div class="post-metadata">

**Author:** ![Une\_BSSSSvue](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/b4bc9f/32.png) [@Une\_BSSSSvue](https://www.ruby-forum.com/u/Une_BSSSSvue)\
**Post date:** [April 27, 2010, 12:06pm UTC](https://www.ruby-forum.com/t/net-http-and-numerical-adress/187636/3 "2010-04-27T12:06:49Z")

</div>

Une BÃ©vue wrote:

> Une Bï¿½vue [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > does it mean Net:HTTP wants to translate the numbers given ?  
> > not at all, i wasn’t reading the right line…  
> > sorry for the noise
> 
> however it seems Net::HTTP can’t download a file from an unregistered  
> domain :

Net::HTTP.start doesn’t take a url, it takes a hostname and optional  
port.

> > res = Net::HTTP.start(‘216.239.59.147’) { |h| h.get(‘/’) }  
> > =\> #\<Net::HTTPOK 200 OK readbody=true\>

---

<div class="post-metadata">

**Author:** ![Une\_BSSSSvue](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/b4bc9f/32.png) [@Une\_BSSSSvue](https://www.ruby-forum.com/u/Une_BSSSSvue)\
**Post date:** [April 27, 2010, 3:56pm UTC](https://www.ruby-forum.com/t/net-http-and-numerical-adress/187636/4 "2010-04-27T15:56:05Z")

</div>

Brian C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Net::HTTP.start doesn’t take a url, it takes a hostname and optional  
> port.
> 
> > > res = Net::HTTP.start(‘216.239.59.147’) { |h| h.get(‘/’) }  
> > > =\> #\<Net::HTTPOK 200 OK readbody=true\>

OK, thanks !
