1

I have an android phone and I need to send some requests to a rails server.

I do the usual stuff by picking up the ip address from ifconfig then using that ip address on port 3000.

It does not work. Even if I run something like wget ip_address:3000 it does not.

Is it because the port 3000 is blocked ?

anone527
  • 45
  • 3

1 Answers1

0

The Rails server only binds to localhost, you need to use the -b option, eg. rails s -b 0 This will bind to 0.0.0.0 (ie. all addresses). My answer here goes into more detail: https://stackoverflow.com/a/29084070/152786

smathy
  • 26,283
  • 5
  • 48
  • 68
  • 1
    This worked! Thanks! I hope this becomes more visible, as I spent ages looking for something that should be so easy to find – anone527 Sep 07 '19 at 09:00