Running a ruby on rails project on my mac. I need to test it on my android phone. Is there a way to view my mac localhost on my android phone?
This worked for me for accessing rails server with IP over local network:
/etc/hosts should have this entry:
127.0.0.1 192.168.100.12
where 192.168.100.12 is the ip address which can be found by ifconfig command in terminal.
Start rails server with this command:
rails server -b 0.0.0.0 -p 8080
I was able to access my localhost through http://192.168.100.12:8080/