I Have 2 applications:
- a rails api running on my mac like this:
rails s
- an android client app talking with the rails api from mi phone
Well, the apps are not talking yet...
I'm trying to perform a POST
to http://192.168.1.34:3000/api/uploads
from the device, but I'm getting ERR_CONNECTION_REFUSED
on chrome.
So, I try to execute the same request from the computer and it returns the same ERR_CONNECTION_REFUSED
.
When I execute http://localhost:3000/api/uploads
, from the computer it works fine.
So, I think the local ip is not mapping to localhost. How can I do this?
I' using:
OSX El Capitan 10.11.1
Google Chorem Version 48.0.2564.23 beta (64-bit)
this is how my /etc/hosts
file looks like:
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 leansmac
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
ping it's working too:
ping 192.168.1.34
PING 192.168.1.34 (192.168.1.34): 56 data bytes
64 bytes from 192.168.1.34: icmp_seq=0 ttl=64 time=0.091 ms
64 bytes from 192.168.1.34: icmp_seq=1 ttl=64 time=0.070 ms
64 bytes from 192.168.1.34: icmp_seq=2 ttl=64 time=0.138 ms
the mac and the phone are connected to the same wifi